Droughts are a recurring feature of Mexican climate, but few high-resolution data are available to test for climate-change forcing of Mesoamerican civilizations. We present a quantitative 2400 yr rainfall reconstruction for the Basin of Mexico, from a precisely dated and highly resolved speleothem, that documents highly variable rainfall over the past 2400 yr. Dry conditions peaked during a 150-yr-long late Classic (ca. 600–900 CE) (Common Era) megadrought that culminated at 770 CE which followed centuries of climatic drying that spanned the fall of the city of Teotihuacán ca. 550 CE. The wettest conditions in the 1450s CE were associated with flooding in the Basin of Mexico. Our data suggest that rainfall variability was likely forced by the El Niño–Southern Oscillation, and impacts on spring-fed irrigation agriculture may have been a stressor on Mesoamerican civilizations.