The massive 7.1 magnitude hit 8 kilometers southeast of Atencingo in the central state of Puebla at a depth of about 51 km, the U.S. Geological Survey said.
Buildings were engulfed by fires in the capital, Mexico City, as people were trapped in buildings.
The quake struck the region hours after people took part in earthquake drills across the country on the anniversary of the devastating quake that killed thousands in Mexico City in 1985.
Dozens of people have been killed.
Video showed the side of a government building collapsing and falling into the street as bystanders screamed.
The quake comes weeks after a powerful 8.1 quake hit the south of the country earlier this month, killing at least 90 people.
Click here for continuing coverage of Mexico's earthquake.
Center of Mexico City right now after 7.4 earthquake. Scary. Hope folks are ok. Video shot by a friend in DF pic.twitter.com/tlYtpEShcB
— David Prager (@dlprager) September 19, 2017
Center of Mexico City right now after 7.4 earthquake. Scary. Hope folks are ok. Video shot by a friend in DF pic.twitter.com/tlYtpEShcB
— David Prager (@dlprager) September 19, 2017