Today the desert margins of northwest India are dry and unable to support large populations, but were densely occupied by the populations of the Indus Civilization during the middle to late Holocene. The hydroclimatic conditions under which Indus urbanization took place, which was marked by a period of expanded settlement into the Thar Desert margins, remains poorly understood. We measured the isotopic values (δ18O and δD) of gypsum hydration water in paleolake Karsandi sediments in northern Rajasthan to infer past changes in lake hydrology, which is sensitive to changing amounts of precipitation and evaporation. Our record reveals that relatively wet conditions prevailed at the northern edge of Rajasthan from ~5.1 ± 0.2 ka BP, during the beginning of the agricultural-based Early Harappan phase of the Indus Civilization. Monsoon rainfall intensified further between 5.0 and 4.4 ka BP, during the period when Indus urban centres developed in the western Thar Desert margin and on the plains of Haryana to its north. Drier conditions set in sometime after 4.4 ka BP, and by ~3.9 ka BP an eastward shift of populations had occurred. Our findings provide evidence that climate change was associated with both the expansion and contraction of Indus urbanism along the desert margin in northwest India.