When an individual files for bankruptcy, he or she is allowed to keep certain personal property without the bankruptcy trustee being able to liquidate that property and pay off creditors with the proceeds. The idea behind this is that bankruptcy is meant to be a way to rebuild your credit and obtain a fresh start on your finances, rather then simply a punishment for not being able to repay all of your debts. In order to achieve this goal, a Debtor (the person filing for bankruptcy) is allowed to keep certain things to help reestablish themselves such as equity in your home and vehicle, household goods, clothing, etc. In addition to these life necessities, a Debtor is generally allowed to keep the money that they have put away and saved for retirement so long as that money is kept in a qualified retirement plan, such as an IRA, 401K, pension or other such ERISA protected account, pursuant to 11 U.S.C §522(D)(10) and 11 U.S.C. §522(b)(3)(C).
Just like if there was no bankruptcy in place, your creditors would have no right to go after any money held in an ERISA protected account even if they had a judgment against you, in a bankruptcy, the Trustee who stands in the shoes of your creditors can not pierce the protection provided by the tax code, and no state law can over ride the Federal exemption relative to ERISA accounts. In fact the statute is so powerful that even the IRS or your state department of revenue can not force a liquidation of a protected retirement account even to pay a tax lien.
There is one major exception to the protection of a qualified retirement plan though and that is if Debtors promised his or her retirement account against specific indebtedness, when the specific account is promised against an anticipated debt, thereby creating a secured relationship between the account and a debt. Recently the bankruptcy Court heard a case on point with this issue, In re Daley, and held that the promise against future debt made the ERISA account non-exemptable. However, both the bankruptcy Court and the Tax Court have held that simply promising the account as security against a future debt is not enough, and that there must be an actual debt the account is promised to cure in order to loose its tax exempt and bankruptcy exempt status.