Acute pyelonephritis (AP) epidemiology has been sparsely described. This study aimed to describe the evolution of AP patients hospitalised in France and identify the factors associated with urinary diversion and fatality, in a cross-sectional study over the 2014–2019 period. Adult patients hospitalised for AP were selected by algorithms of ICD-10 codes (PPV 90.1%) and urinary diversion procedure codes (PPV 100%). 527,671 AP patients were included (76.5% female: mean age 66.1, 48.0% Escherichia coli), with 5.9% of hospital deaths. In 2019, the AP incidence was 19.2/10,000, slightly increasing over the period (17.3/10,000 in 2014). 69,313 urinary diversions (13.1%) were performed (fatality rate 6.7%), mainly in males, increasing over the period (11.7% to 14.9%). Urolithiasis (OR [95% CI] =33.1 [32.3–34.0]), sepsis (1.73 [1.69–1.77]) and a Charlson index ≥3 (1.32 [1.29–1.35]) were significantly associated with urinary diversion, whereas E. coli (0.75 [0.74–0.77]) was less likely associated. The same factors were significantly associated with fatality, plus old age and cancer (2.38 [2.32–2.45]). This nationwide study showed an increase in urolithiasis and identified, for the first time, factors associated with urinary diversion in AP along with death risk factors, which may aid urologists in clinical decision-making.