Pakistan is one of the most vulnerable counties in terms climate-change impacts on its agricultural productivity. Agriculture is not only the largest sector in Pakistan’s economy, the food security of its over 220 million inhabitants also strongly depends on its production. As Pakistan’s arid croplands are extensively irrigated, agricultural productivity is affected by increasing temperatures (projected to increase up to 6°C between 2000 and 2100 under a limited climate-change mitigation scenario), changes in water availability (i.e. river streamflow and groundwater resources) and atmospheric carbon dioxide concentrations ([CO2]; affecting both crop productivity and water use efficiency). Here we present the impacts of climate change on Pakistan’s primary cereal crops: wheat and rice. Impacts are quantified by combining several climate-change scenarios with a process-based coupled hydrological-crop model, VIC-WOFOST. VIC-WOFOST comprehensively estimates changes in crop growth, water resources and their interactions under climate change. Moreover, the role of elevated [CO2] on agricultural productivity and sustainable water use is specifically assessed. We then explore the possibilities and limitations of agricultural adaptation to enable sustainable food security for Pakistan under various climate-change and population growth scenarios. Our results show that climate-change will severely affect Pakistan’s agriculture, especially due increased temperatures and crop heat stress. However, climate-change adaptation can potentially mitigate some of these effects, especially for wheat production. Moreover, with sufficient agricultural adaptation, climate-change can even be beneficial for Pakistan’s agriculture due to the benefits of elevated [CO2]. While our study is focussed on Pakistan, it indicates pathways for sustainable food production under climate change that may also be important for other regions that strongly depend on irrigated agriculture