The teenager was pronounced dead by the side of a railway line in Wrenthorpe, near Wakefield, West Yorkshire, on Saturday.
A 16-year-old boy and a woman aged 18 were also taken to hospital with non-life threatening injuries at 18:40 BST.
British Transport Police (BTP) said the death was not thought to be suspicious.
A spokesman said all three were from the local area.
"At this stage it would appear that the two boys and the female were on the railway line and the 15-year-old boy had climbed on to a freight train at the location," he said.
The Office of Rail Regulation has been informed of the death and a file will be prepared for the coroner, he added.
A 15-year-old boy who climbed onto a freight train has died after he touched overhead power cables, police have said.