British Transport Police today said its officers were called to the line at Ranskill Crossing in South Yorkshire after a report that a person had been struck by a train at 5.23pm.
Medics from the local ambulance service attended alongside officers but the man, who was in his forties, was pronounced dead at the scene.
A spokeswoman said: "His next of kin has been informed. The death is not being treated as suspicious and so a file has been prepared for the coroner."
The line was closed between Retford and Doncaster for several hours following the incident, with trains cancelled or delayed as a result.