Abstract. We investigate changes in in-stream nitrogen retention and metabolic processes in the River Elbe between 1978 and 2020. We analyzed multi-decadal time series data and developed a metabolic nitrogen demand model to explain trends in dissolved inorganic nitrogen (DIN) retention, gross primary production (GPP), and ecosystem respiration (ER) during a period of highly dynamic pollution pressures in the Elbe River (Central Europe). Our findings reveal a marked increase in summer DIN retention and a decrease in winter DIN retention, establishing a distinct seasonal pattern. We identified three periods in the Elbe's DIN retention dynamics: dominantly heterotrophic under high pollution pressure (1980–1990), transition (1990–2003), and dominantly autotrophic with lower pollution (2003–2017). We link these changes to reduced industrial pollution, improved wastewater treatment, and a shift in the in-stream balance between heterotrophic and autotrophic processes. During the first period, high ER and heterotrophic growth efficiency contributed to elevated metabolic nitrogen demand, primarily driven by heterotrophic processes. As pollution levels decreased, GPP rates increased, and ER gradually declined, prompting a shift towards an autotrophic-dominated nitrogen retention regime. Our study indicates a tight coupling of nutrient reduction from external sources and dominant processes of natural attenuation in large rivers which needs to be considered for projections of recovery trajectories towards sustainable water quality.