Mexico City is in Mexico.
Greater Mexico City refers to the conurbation around Mexico City , officially called Valley of Mexico Metropolitan Area ( Zona Metropolitana del Valle de México ) , constituted by Mexico City itself composed of 16 Municipalities -- and 41 adjacent municipalities of the states of Mexico and Hidalgo . Mexico City . It is located in the Valley of Mexico ( Valle de México ) , a large valley in the high plateaus at the center of Mexico , at an altitude of 2240 m . According to the most recent definition agreed upon by the federal and state governments , the Greater Mexico City population is 21.2 million people , making it the second-largest metropolitan area of the western hemisphere , behind New York City , the tenth-largest agglomeration , and the largest Spanish-speaking city in the world . The city was responsible for generating 15.8 % of Mexico 's Gross Domestic Product and the metropolitan area accounted for about 22 % of total national GDP .