An eyewitness tells Action News it looked like a fireball on top of the railcar.
The incident happened around 12:30 a.m. at the West Trenton Train Station on Sullivan Way.
The SEPTA railcar inspector, said to be a 49-year-old man from Elkins Park, Pennsylvania, suffered shocks and serious burns while working on top of railcar 127.
Two other workers were in the rail yard at the time, and when officers arrived, they rushed them over to their friend and coworker.
Police say the victim was able to speak but could not move.
Fire companies from several areas responded to the scene. Because of the heavy voltage, SEPTA crews had to quickly de-energize the scene and a high angle rescue team had to carefully work to safely get to the victim.
It took about an hour before crews managed to reach the injured worker.
The victim suffered 3rd degree burns and was airlifted to Saint Barnabas Medical Center in Livingston, New Jersey where he is listed in critical condition.
Rescuers say thousands of volts went through his body.
SEPTA says only one train bound for West Trenton was affected, and the ten passengers aboard were bused to another location.
Train 127 has been moved to another yard while the investigation continues.