Police say they responded to a 911 call reporting shots fired about 6:20 p.m. Sunday in the city's Beltzhoover section.
Police didn't find any suspects, but they did find two different types of bullet casings about a block apart, suggesting two people had been shooting at each other.
One of the shots went wide and about 40 feet high and knocked out the transformer, darkening the area, as well as parts of Mount Washington and nearby Route 51, including lights inside the Liberty Tunnel.
Duquesne Light crews were able to replace the transformer in about an hour.
Police haven't found any signs of injuries from the gunfire or the sparking transformer.