It happened at about 1:30 am Thursday on Highway 49 between Ahwahnee and Oakhurst.
California Highway Patrol officers say the driver allowed his Subaru to veer to the left on the road, hitting a tree.
The car burst into flames, and the man was pronounced dead at the scene.
No one else is believed to have been involved in the crash.