“If you’re both co-signers on the loan, you’re both responsible for the debt, no matter what you decide in your divorce.
The only exception is if you decide to refinance with only one of your names on the loan, but you would have to qualify separately.
You can trade the car in, or sell the equity you’ve invested in it, but you’ll still be responsible for the difference between the values of the loans. For example, if your loan is currently $20,000 and you get $15,000 from selling the car, you’ll still be responsible for the difference plus whatever the loan is on the new car.
Since you’re separating, it may be more straightforward to try to sell the equity you have invested and split the remaining debt. Talk to a lawyer or your financer about your options.