Evolution of ecosystems in the northeastern Mexico since the Last Glacial Maximum (LGM) and through the Holocene are yet to be fully characterised, creating a gap in our understanding of the ecological response to climate change in this water scarce region. Here we explore the response of lacustrine and surrounding terrestrial habitats of this region to hydrological changes of the late Pleistocene and especially the Holocene. Biomarker-based proxy data from the El Potosi Basin indicates dynamic and variable input of organic matter (OM) into the basin, with sources being the surrounding vegetation, bacterial biomass and aquatic microfauna. Changes in these inputs reveal distinct stages of ecosystem development over the last 20,000 years. Overall low lipid abundances (as a proportion of TOC) from 20 to 19 cal kyr BP, mainly from aquatic/in-situ microbial biomass and degraded terrestrial OM, are attributed to relatively low runoff. Increasing lipid proportions during the deglaciation, from 19 to 15 cal kyr BP, were mostly derived from terrestrial sources like woodland vegetation, soil and wetland vegetation, and we attribute them to more rainfall and runoff. Subsequently, the wetland biomarkers disappeared, and woodland input began to dominate the OM assemblage from 15 to 11.7 cal kyr BP. During the early- and mid-Holocene, after about 11.7 cal kyr BP, putative woodland and grass inputs decreased and the dominant vegetation appeared to shift to subtropical desert shrub, which could have been due to increasing regional aridity. The onset of the dry late Holocene was characterised by gradual environmental transition and ecosystem adaption, especially from 4.2 to 2.8 cal kyr BP. The terrestrial vegetation comprised increasing proportions of C4 grasses, documented by changes in leaf wax carbon isotopic compositions, and potentially more open-vegetation, while the in-lake bacterial production increased. With increasing desertification from 2.8 cal kyr BP, the terrestrial productivity decreased substantially, the lake became shallower/ephemeral, and the surrounding soils became more alkaline. Changes of the limnic habitat from algal towards microbial communities occurred ~300 years after the onset of terrestrial habitat changes. During the last millennium, the C3 components of the vegetation again dominated. This implies an enhanced moisture supply, possibly from agricultural activities. Overall, this work reveals the marked sensitivity of northeastern Mexico ecosystems to the climatic shifts that occurred since the LGM, and this perhaps indicates their vulnerability to future global warming.