The Mexican highlands are areas of high biological complexity where taxa of Nearctic and Neotropical origin and different population histories are found. To gain a more detailed view of the evolution of the biota in these regions, it is necessary to evaluate the effects of historical tectonic and climate events on species. Here, we analyzed the phylogeographic structure, historical demographic processes, and the contemporary period, Last Glacial Maximum (LGM) and Last Interglacial (LIG) ecological niche models of Quercus castanea, to infer the historical population dynamics of this oak distributed in the Mexican highlands. A total of 36 populations of Q. castanea were genotyped with seven chloroplast microsatellite loci in four recognized biogeographic provinces of Mexico: the Sierra Madre Occidental (western mountain range), the Central Plateau, the Trans‐Mexican Volcanic Belt (TMVB, mountain range crossing central Mexico from west to east) and the Sierra Madre del Sur (SMS, southern mountain range). We obtained standard statistics of genetic diversity and structure and tested for signals of historical demographic expansions. A total of 90 haplotypes were identified, and 29 of these haplotypes were restricted to single populations. The within‐population genetic diversity was high (mean hS = 0.72), and among‐population genetic differentiation showed a strong phylogeographic structure (NST = 0.630 > GST = 0.266; p < .001). Signals of demographic expansion were identified in the TMVB and the SMS. The ecological niche models suggested a considerable percentage of stable distribution area for the species during the LGM and connectivity between the TMVB and the SMS. High genetic diversity, strong phylogeographic structure, and ecological niche models suggest in situ permanence of Q. castanea populations with large effective population sizes. The complex geological and climatic histories of the TMVB help to explain the origin and maintenance of a large proportion of the genetic diversity in this oak species.