Permission of the Court
Your estate can't file for bankruptcy, but a somewhat similar procedure exists if you die in debt. When your executor ascertains that there's not enough money to pay everyone, she must typically file a petition with the court, alerting the judge. The judge then issues an order, detailing which debts can be paid from your available money and from liquidation of your property.
Order of Payment
If you die owing taxes – or any other debt to the federal government – it is paid first. The costs of operating your estate are usually paid next, followed by expenses associated with your burial or final illness. The exact order can vary somewhat from state to state, but generally, your unsecured debts – such as credit cards – are paid last. If the money runs out before these creditors receive payment, they don't get paid. Otherwise, they share whatever is left on a pro rata basis. For example, if there's $10,000 left in your estate, but your debts total $100,000, each creditor would receive 10 cents for each dollar you owe him.
Exceptions to the Rules
If anyone cosigned a debt with you, they become responsible for it when you die. If you live in a community property state, your spouse may be responsible for your debts if you incurred them while you were married. Secured creditors typically receive their collateral back.