British Transport Police were called to the line in Moorends, near Doncaster, at 6.13pm yesterday following reports of a casualty on the tracks.
Emergency crews attended at the level crossing in Marshland Road following the incident which closed the railway line between Doncaster and Hull for several hours.
A spokesman for British Transport Police said: “Officers were called to the line in Moorends at 6.13pm yesterday following reports of a casualty on the tracks.
"Paramedics also attended, however sadly a male was pronounced dead at the scene. This incident is not being treated as suspicious and a file will be prepared for the coroner.”
It is understood that the male who died was a young boy.
Rail operator Northern said trains had been diverted as a result of the tragedy.