Climate change alters water availability (precipitation minus evapotranspiration, i.e., water yield, WY), especially in arid regions like Northwest China (NWC) where water resources are limited. Despite large-scale implementation of ecological restoration projects has contributed to greener vegetation, this may exacerbate dryland water stress, which in turn interferes with climate change impacts on WY. To better understand this issue we used the random forest model to differentiate the effects of climate change and human activities on WY. We also employed the structural equation model to explore how vegetation greening influenced climate-induced WY trends. The results showed that the multi-year average WY in NWC was 2162.21 t and demonstrated a rising trend from 1982 to 2018, primarily driven by climate change. In contrast, anthropogenic activities had minimal effects on WY but were effective in amplifying the warming and wetting effects of climate (6.64 %-7.98 %) and counteracting unfavorable climate stress effects. Vegetation greening exacerbated soil water depletion, leading to increased evapotranspiration and mitigating the positive effects of climate change on WY. Our results are crucial for an effective comprehension of the role of vegetation in regulating terrestrial water fluxes in arid regions, providing a theoretical basis for ecological restoration.