Emergency services were called at around 6.50pm to the scene of the crash, which happened on Stang Lane between Lingerfield and Farnham.
North Yorkshire Fire Service said crews from Harrogate and Knaresborough found the car smouldering when they arrived.
A spokesman said: "Crews used a hose reel to dampen down before making the vehicle safe using hand tools.
"All persons were out of the vehicle and being assessed by paramedics."
North Yorkshire Police said the two occupants of the car had been taken to hospital.
The driver suffered a fractured ankle and a passenger was being kept in hospital for observation.
Acting Inspector Paul Cording tweeted: "Incredible nothing more serious after colliding with a tree. My thanks to all those who assisted at the scene."