The accident happened in New Port Richey, Fla. and it was all caught on video.
The vehicle burst into flames after hitting a power pole. The video shows the car with all the flames and black smoke around it.
Electrical wires from the telephone pole had fallen onto the car and the flames were quickly spreading.
Deputy Kelly Endricks got there just in time to pull the man out.
"I went right to the first window, bashed that open first, hoping he could get to the back. When he said he couldn't get there, I just went to sunroof and hit that one open. Fortunately, I was able to yank him out of the car and get away from there as quickly as possible," said Endricks of the Pasco County sheriff's office.
The driver suffered only minor injuries. He told investigators he was trying to avoid another car and lost control of his vehicle.
The accident remained under investigation.