The Bank's Right of Set-Off and How to Protect Your Money From Them
If you have money in a bank account at an institution to which you owe money, for example on a loan or a credit card with that same bank, that institution probably has the right under state law to take your money (from your checking or savings) and apply it to your debt to them. This is known as a "set-off."
So, if you file bankruptcy owing $10,000 to ABC credit card, ABC Bank can take the contents of your savings and/or checking account at ABC Bank on the day you file your bankruptcy to pay the credit card bill.
As such, it's a good idea NOT to have money on deposit in a bank to which you owe money - even in bankruptcy. There are plenty of other good banks you can open free checking accounts in where you do not owe the bank any money. Obviously, ABC Bank cannot set-off/take money from your new bank to pay any debt you may still owe ABC Bank.
The right of set-off does not apply to money deposited AFTER the bankruptcy case is filed, BUT the chances of it happening "accidentally" are too great to take such a risk. Banks are not immune to breaking the law and will continue to do so if it is in their financial interest.
It is always the best bet to open up new accounts at new banks before you file for bankruptcy. That means moving all of your cash, and automatic deposit instructions, to your new bank.