Mexico's National Migration Institute (INM) issued a press release saying the accident occurred along a stretch of rail in the southern state of Oaxaca's Isthmus of Tehuantepec region, Xinhua reported.
The train is regularly used by Central American and Mexican migrants, who ride atop the cargo cars on their way north to the US border.
The derailment was the result of old and poorly maintained rail tracks, train operators said.
Also known as the "train of death", the cargo train has derailed on various occasions. In August 2013, a similar accident killed five stowaways and injured 35.
Thursday's incident occurred near the town of Las Anonas, in the municipality of San Pedro Tapanatepec, some 800 km south of the capital Mexico City.