The incident happened in front of a home on Avenue C in Bayonne around 11:45 a.m.
PSE&G said the transformer caught fire and fell, landing on the two cars and causing them to go up in flames as well.
Tavar Hamaakarim tells Eyewitness News she had just gotten her small child out of the car and entered her home when the vehicle caught fire.
"This was very scary," she said. "I heard a big sound, and I saw the car burning."
Neither she nor her son was injured.
"We were upstairs and heard the bang, ran out to see the cars on fire," said Shvan Samakaram, the owner of the other car. "It was shocking the fire shooting from my hood."
Bayonne's Engine 2 and Ladder Tower 2 responded, along with PSE&G. Firefighters sprayed foam on the vehicles, and the utility began work right after to repair the lines to restore power to approximately 53 customers who lost it.
The accident was a near-miss for Raymond Maldonado, whose red mini van was parked right behind the cars that caught fire.
"I'm blessed," he said.
The cause of the failure is under investigation.