Police are not treating the death, which happened yesterday afternoon, as suspicious and a file will be prepared for the coroner.
The emergency services were called to the line close to Station Avenue in Chirk shortly before 4pm following a report of a casualty on the tracks.
Officers from British Transport Police and paramedics from the Welsh Ambulance Service attended.
However a man was pronounced dead at the scene. His family have been informed.
A spokesman for the British Transport Police said: "This incident is not currently being treated as suspicious and a file will be prepared for the coroner.”