His body was found as the regional train arrived early on Sunday morning in Menton, in the south of France, its first stop after Ventimiglia station in Italy.
Police suspect that the man climbed on top of the train to make the 15-minute journey across the border and may have grabbed hold of an overhead electric line to avoid being thrown off.
Passengers reported hearing three loud bangs and seeing flames, France Info reported.
It is the fifth such incident on the cross-border train line in a year, according to Ansa, most recently in August. Four people died of their injuries, while one was rescued.
While the number of people arriving in Italy via the Mediterranean fell significantly in the past six months, migrants already in Italy continue to risk their lives attempting to cross into other European countries illegally.
Rescue teams in the mountains between north-western Italy and France have warned of an “emergency” as migrants try to hike across the border despite heavy snow and freezing temperatures, many of them without proper clothing or equipment.