The 21-year-old was walking home from a party at around 6am with two friends when he climbed onto a stationary train and tried to cut across the tracks.
But he received an electric shock from an overhead cable and was taken to a specialist burns unit in Offenbach, police said in a statement on Sunday.
Bild newspaper reported he suffered 90 percent burns.
Police said the soldier, who is stationed in Kempten, Bavaria, was in an artificial coma in a “life-threatening” condition.
His two friends, aged 20 and 21, are suffering from shock and were also treated by doctors. They have been unable to give witness statements.
SEE ALSO: US army veteran killed by his model helicopter