Studying the hydrochemical evolution of river water and groundwater is vital for comprehending complex regional hydrological cycles and managing water resources. An investigation of hydrochemical evolution mechanism of river water and groundwater was executed in an arid and semi-arid endorheic watershed located in the eastern edge of Qaidam Basin, northwest China, by analyzing major ions and strontium isotopic compositions with the combination of hydrogeochemical methods, PMF model and Pearson correlation analysis. From upstream to downstream, the major ions, 87Sr/86Sr values and hydrochemical types of river water and groundwater show spatial variations. Major ions and 87Sr/86Sr analysis reveal that the hydrochmical compositions of river water and groundwater are primarily attributed to silicate weathering, carbonate weathering, evaporite weathering, and agricultural activity. The contribution of four factors affecting the hydrochemical evolution show obvious spatial variations along the flow path. The hydrochemical compositions of river water from the upstream to downstream are mainly contributed by carbonate and silicate weathering as well as weak evaporite weathering (<25%), which are affected by agricultural activity with a great contribution (>25%) in the middle and lower reaches. The contribution to the hydrochemical compositions of groundwater is relatively small (<25%) for carbonate, silicate and evaporite weathering, but great (>25%) for agricultural activity. This study provides implications for understanding the formation and evolution of water and better watershed water management in that typical endorheic watershed basin and even at larger scales.