In the case of In re Stokesberry, Case No. 13-31714, in the U.S. Bankruptcy Court for the Southern District of Texas, the Court ruled that if a debtor takes money out of a 401(k) retirement plan before bankruptcy, such that it is in his or her bank account on the date of filing bankruptcy, it is not exempt. That is, the debtors cannot keep it; they have to turn it over to the chapter 7 bankruptcy trustee for distribution to creditors.
These particular debtors had also had their regular Social Security benefits being deposited in that same bank account. The Social Security Act says that social security benefits remain exempt, even after they are deposited into a bank account.
So the Court performed "tracing" and determined that $4289.76 was not exempt, and had to be paid to the Chapter 7 Trustee, but $6599.55 was exempt, and the debtors could keep it.
In this case, I'm not sure what happened, but the attorney either was not aware that 401(k) proceeds were not exempt once deposited in a bank account, or didn't counsel his clients correctly, or perhaps the debtors just did something on their own, But in any event, be careful and if you take fund from a retirement account and you are going to file bankruptcy, disclose it to your bankruptcy trustee, and hopefully either have it spent, exempted under the federal "wildcard" exemptions, or be prepared to hand it over to the trustee.