Endorheic basins around the world are suffering from water and ecosystem crisis. To pursue sustainable development, quantifying the hydrological cycle is fundamentally important. However, knowledge gaps exist in how climate change and human activities influence the hydrological cycle in endorheic basins. We used an integrated ecohydrological model, in combination with systematic observations, to analyze the hydrological cycle in the Heihe River Basin, a typical endorheic basin in arid region of China. The water budget was closed for different landscapes, river channel sections, and irrigation districts of the basin from 2001 to 2012. The results showed that climate warming, which has led to greater precipitation, snowmelt, glacier melt, and runoff, is a favorable factor in alleviating water scarcity. Human activities, including ecological water diversion, cropland expansion, and groundwater overexploitation, have both positive and negative effects. The natural oasis ecosystem has been restored considerably, but the overuse of water in midstream and the use of environmental flow for agriculture in downstream have exacerbated the water stress, resulting in unfavorable changes in surface‐ground water interactions and raising concerns regarding how to fairly allocate water resources. Our results suggest that the water resource management in the region should be adjusted to adapt to a changing hydrological cycle, cropland area must be reduced, and the abstraction of groundwater must be controlled. To foster long‐term benefits, water conflicts should be handled from a broad socioeconomic perspective. The findings can provide useful information on endorheic basins to policy makers and stakeholders around the world.