Your car might be kept if you declare bankruptcy. But this will depend on a few things, such how much your automobile is worth and whether your payments are current.
You might be eligible to exempt your car from the bankruptcy estate if you are current on your car payments and it is worth less than a specific amount (which varies by state). You may continue to drive your car as a result.
Your car could, however, be repossessed or sold to pay off your creditors if you are falling behind on your payments or if its value exceeds the exemption threshold.
Talk to an experienced bankruptcy attorney in your state to find out if you will be able to keep your car if you file for bankruptcy.