We aimed to examine trends in the incidence of treated infections following hip fracture surgery in Denmark from 2005 to 2016. We conducted a nationwide cohort study using individual‐level linked data from Danish population‐based registries. We calculated cumulative incidence considering death as competing risk and, based on the pseudo‐observation method, risk ratios (RRs) with 95% confidence interval (CI) using the period 2005–2006 as a reference. RRs were adjusted for age, sex, and comorbidity. A total of 74,771 patients aged 65 years or older with first‐time hip fracture surgery were included. The risk of postoperative (at 15, 30, 90, and 365 days) infections increased during 2005–2016. The 30‐day cumulative incidence of all hospital‐treated infections increased from 10.8% (95% CI, 10.2% to 11.3%) in 2005–2006 to 14.3% (95% CI, 13.7% to 15.0%) in 2015–2016 (adjusted RR 1.32; 95% CI, 1.23 to 1.42). Adjusted RR for 30‐day hospital‐treated pneumonia was 1.70 (95% CI, 1.49 to 1.92). The 30‐day cumulative incidence of redeeming community‐based antibiotic prescriptions increased from 17.5% (95% CI, 16.8% to 18.2%) in 2005–2006 to 27.1% (95% CI, 26.3% to 27.9%) in 2015–2016 (adjusted RR 1.54; 95% CI, 1.47 to 1.62). The largest increase was observed for broad‐spectrum antibiotic use (adjusted RR 1.79; 95% CI, 1.68 to 1.90). During 2005–2016, risk of infections was substantially higher in hip fracture patients than in the general population. The risk of hospital‐treated pneumonia and antibiotic prescriptions increased more over time among hip fracture patients. We found increased risks of postoperative treated infections following hip fracture surgery during the 12‐year study period, which could not entirely be explained by similar infection trends in the general population. Given the high mortality following infections in the elderly, further research is needed to identify patients at increased risk to target preventive treatment and potentially reduce complications and mortality in hip fracture patients. © 2018 American Society for Bone and Mineral Research.