The driver jumped out to deal with the fire, causing the vehicle to jump a curb and hit a tree.
The Tempe Fire Department says the fire was put out before crews arrived, and one person was evaluated at the scene for minor injuries. The driver will be taken to the hospital for treatment of burns to their leg, police said.
A woman who lives feet from the crash scene is glad the trees shielded her apartment from the truck.
"If that tree wasn't there, I mean it would have gone right into the window right there, right into our living room," Shelbi Harry said.