Sorry to hear
Do you have the title? If so, try to unload the car for the agreed upon price you had with the seller, and then pay him off. That way, you walk away with no money out of pocket and all the wiser for your experience. If you don't have title, see if title holder will agree to letting you find another buyer. I would NOT just give him back the car because it looks like he sold it to you in bad faith (Hard to believe he didn't know the vehicle's history.) Tell him YOU don't have the money right now and he won't get it until you can sell the car first. That puts you in a much better position.
Lots of dealers are looking to take in cars for trade. They, of course, are going to know about the car's history before they accept it for trade, so see if they will cut you a good deal on a new set of wheels to give them incentive to sell you another vehicle.
I guess you learned your lesson, and will know what to do first next time. Good luck!