Closing the irrigation water productivity (IWP) gap is an effective approach to alleviating water deficits and ensuring food security. However, few studies have attempted to quantify the IWP gap and the potential benefits of closing it. This study adopted the Heihe River Basin, the second-largest inland basin in China, as a typical study area. The aims of this study were to: (1) assess the positive achievements and potential risks triggered by the Heihe Ecological Water Diversion Project (EWDP) according to multi-source and multi-scale measured data; (2) analyze potential approaches to improve the IWP and quantify the potential benefits that can be achieved by closing its IWP gap. The results of this study indicated that the EWDP effectively reallocated surface water resources, replenished groundwater in the lower reaches, and facilitated the recovery of oases and economic development in the downstream regions. However, this project has indirectly led to an imbalance in the groundwater resource between the middle and lower reaches, resulting in decline in groundwater levels and degradation of local vegetation in the midstream regions. In addition, the expansion of cultivated land in the midstream and downstream oases has resulted in the deterioration of farmland environment. The water transfer resulted in a deceleration in the growth of IWP from 2.44 % to 1.15 %, and the existing IWP gap was 1.43 kg/m3 between 1984 and 2017. This study predicted a future increase in the IWP to 2.01 kg/m3 with a reduction in the gap to 0.45 kg/m3 while maintaining food production. The potential for conserving water in the Heihe agricultural region can reach 552 million m3 by reducing the planting area by 10 %, improving irrigation water use efficiency by 20 %, maintaining existing agricultural film inputs, and reducing fertilizer application by 10 %. Following the research recommendations can greatly alleviate the agricultural water shortage and over-extraction of groundwater in the middle reaches and ensure meeting ecological water demand in the lower reaches. This study can act as a reference for sustainable management of an endorheic basin.