Source: Wikimedia Commons.

There's a group of folks out there I like to call Retirement Planning Ninjas. This obscure group of warriors has figured out some of the best, most tax-advantaged and tricky ways to save up tons for retirement.

Last year, while preparing my taxes, I came upon a website that promotes a method that has unheard-of benefits: putting money into an investment account tax-free, letting it grow tax-free, and then pulling it out -- tax-free. It turns out some mainstream financial sites have caught on as well.

That kind of benefit has me so excited that I've already talked my wife into using this account in hopes that it could help pave the way for an early retirement.

But you might be surprised to learn that this isn't some form of IRA, or even a company-sponsored 401(k) or 403(b). Instead, this secret account that people rarely view as a retirement tool is...

A Health Savings Account
That's right: It is, in fact, a health savings account that has the potential to yield some pretty awesome benefits. But there are some rules you need to play by to reap these benefits, so pay attention closely and make sure using an HSA for retirement purposes is appropriate for your own individual situation.

Let's start with the basics. A health savings account is available to folks who have high-deductible health-insurance plans. Such plans are currently offered by UnitedHealth (UNH -1.03%), WellPoint (ELV 0.13%), and Humana (HUM 0.82%), among others. And as far as HSAs go, "high-deductible" means at least $1,250 for individuals and $2,500 for families.

Whenever you have to pay out-of-pocket expenses for medical care, you can either pay directly from your HSA account (via a debt card) or reimburse yourself for the payment at a later date. Every year, individuals can contribute a maximum of $3,300 to their HSAs, while families can contribute $6,550.

There are two enormous benefits that HSAs have that their Flexible Spending brethren don't. First, any money unused at the end of the year isn't lost; it's simply rolled into the next year. Second, while money is sitting in an HSA, it can be invested in much the same way that money in a 401(k) can.

So how does this help me with retirement?
There are a few keys to making this arrangement work in your benefit. The first is that the IRS doesn't designate when you have to reimburse yourself for out-of-pocket medical payments. Because of this, you can simply pay for a medical expense out of pocket and wait months -- if not years -- to reimburse yourself. In the meantime, that money stays in your HSA and grows over time.

For instance, last year my wife and I had to pay for the birth of our daughter out of pocket because there were no health insurance options available on the marketplace that would cover us. In total, it was about $5,000.

We were fortunate enough to have that money available, but we paid it out of pocket instead of using our HSA money or reimbursing ourselves. We did that because we'd rather give that $5,000 time to grow -- tax-free -- until we need to take it out.

When that time comes -- possibly when we put a down payment on our first house -- we can draw that money out (tax-free) and use it as we please. Remember, in the government's eyes, we are simply paying ourselves back for maternity costs, even if the costs were incurred years ago.

Any money that's left over in the account thanks to capital growth can stay there and be used at a later date when we decide to reimburse ourselves for other expenses.

As you might expect, the higher one's deductible is, the more beneficial the plan can become, barring a medical catastrophe. That's because HSAs can't be used to reimburse premiums -- only out-of-pocket medical expenses. The higher the deductible, the more likely you are to have out-of-pocket expenses, and the easier it is to recoup that tax-free money.

The most important thing to remember is that receipts and records must be kept in case you're audited and need to justify all medical expenses should, and you must ensure that these expenses are never reimbursed by any other party or used in an itemized deduction on your taxes.

But what if I don't spend that much on medical expenses?
Obviously, if you stay healthy throughout your life (good for you!), this plan might not sound too enticing. Indeed, if you withdraw money for nonmedical expenses, you'll be faced with a 20% tax penalty.

At least, that's the case until you turn 65, at which point the penalty is gone and your HSA basically becomes a traditional IRA. You'll still be taxed on any disbursements you take that aren't for medical expenses, but at a much lower rate that's comparable with what you'd be paying on, say, a 401(k).

Of course, its important to balance the benefits of traditional IRAs (especially when there's an employer match), Roth IRAs (which allow you to extract your principal five years after it was inserted at no cost), and HSAs before diving in and maxing out your contributions. And remember: It's clear that HSAs were never meant to be used primarily as a retirement tool.

But retirement savings is clearly a benefit that's underused, and with the onset of Obamacare and its higher-deductible plans, it's one that you should seriously consider.