The incident took place on the Roslagsbanan electrified railway line in Täby as commuters made their way to work at around 8am.
Police at the scene described the death as accidental.
The railway line was closed on the Vallentuna-Täby Kyrkby route following the accident.
Commuters were instead urged to make use of buses brought in to temporarily replace the rail service.