The fire broke out around 4:30 p.m. at the station on Route 1 and 287 at the intersection with Pierson Avenue.
Flames shot at least 50 feet into the air and smoke could be seen from at least 10 miles away.
The transformer contains a non-toxic mineral oil, which caught fire.
Firefighters used foam to help extinguish the blaze, which they brought under control by 5:45 p.m. No injuries were reported.
Major travel delays were reported during the evening commute and were expected to continue for hours.
Some 10,000 customers in Metuchen, Edison and Woodbridge were without power for a few hours Tuesday evening, but by 9:30 p.m. all of the power had been restored.
Get Eyewitness News Delivered