More than 70 others were injured as the blast hit the San Pablito fireworks market in Tultepec, about 20 miles (32km) outside the city.
Video from the scene showed a large number of fireworks rocketing into the air as they caught fire.
Dozens of paramedics and police attended the scene. The cause of the explosions is not yet known.
Locals have been told to avoid the area and keep roads clear.
Eruviel Avila, governor of the State of Mexico, said some children had suffered burns to more than 90 per cent of their bodies and they were being sent to the US city of Galveston, Texas, for specialised treatment.
Most of those killed are so badly burned their bodies will have to be identified using DNA testing, he added.
- GUYANA - Legislator who brought down gov't may have committed treason
- GUYANA - Gov't maintains position regarding incident involving Venezuelan navy
- JAMAICA - Twenty murders in first week of 2019
- Caribbean islands record three earthquakes in 24 hours
- GUYANA: Body of child found after gold mine collapses
- REGIONAL - Cruise Line warns passengers to avoid Fish Fry area in Bahamas
- Mobile App