The answer to this question is not very clear, because there are many factors that go into whether or not making a contribution to your IRA on the eve of your bankruptcy case is a transaction that would be considered to have been done in good faith. Typically you are allowed to perform what’s called pre-bankruptcy planning before filing your bankruptcy case. This involves arranging your affairs so that you pay as little as possible to the trustee after you file bankruptcy. The concern when you make an IRA contribution is that you’re taking money that would have been available to pay creditors and putting it into a retirement account that is almost universally considered to be an exempt asset that the trustee and creditors can’t reach.
Nevertheless, this kind of planning is usually permitted by the bankruptcy court. However, if there’s a perception that a debtor has been too aggressive in spending their cash or rearranging their assets before they file bankruptcy, the court could find that the filing was in bad faith, or the exemption is denied, or in the worst scenario, that discharge will be denied because you transferred assets within a year before the bankruptcy, with an intent to hinder, defeat or delay your creditors. If that happens, it will likely be a problem without a solution. Proper pre-bankruptcy planning is a subtle and sensitive process, and if it’s not handled property the results could be disastrous.