This study simulates monthly concentrations of riverine total nitrogen (TN), ammonia-nitrogen (NH₄-N), total phosphorus (TP), and chemical oxygen demand (CODₘ) in 613 sub-watersheds of China's 10 major river basins from 1980-2050. Using a 16-year monitoring dataset and stacking machine-learning models, the results show marked water quality improvement except for TN, possibly due to lacking control targets and assessment systems. Anthropogenic factors were the primary controls on TN, TP, and NH₄-N concentrations. The study suggests considering water resources, environment, ecology, and security collectively to improve China's river ecological status, aligning with the 17 sustainable development goals (SDGs) relevant to water quality.