Chapter 13 bankruptcy has a nice feature called the cramdown. It allows you to reduce the amount of certain secured debts to the value of the property securing the loan. You can cram down a car loan, but only if you bought the car more than 910 days before you filed for bankruptcy. This is referred to as the "910-day rule."
If you are underwater on your car loan -- which means you owe more on the car than the car is worth -- you might be eligible for a cramdown. In a cramdown, you can reduce the balance on your car loan to the value of the car. So, for example, if you owe $10,000 on your car loan and your car is worth $8,000, you can reduce your loan to $8,000. The remaining $2,000 of the loan balance becomes unsecured debt, and is treated like the rest of your unsecured debt (which means you pay it through your Chapter 13 plan -- probably at a big discount).
For a more detailed explanation of how cramdowns work for car loans, see Car Loan Cramdowns.
There is one limitation to cramming down your car loan. You must have gotten the car loan more than 910 days before you filed for bankruptcy. The intent of the law is to prohibit cramdowns on newly purchased cars.
If you bought your car more recently than 910 days, you cannot cram down the loan.