Community-acquired pneumonia (CAP) remains an important public-health problem, and the COVID-19 pandemic and non-pharmaceutical interventions (NPIs) may have altered its burden. This study aimed to provide updated CAP burden among adults in Shanghai from 2016–2023.We analysed 61,230 participants aged 20–74 years from the Shanghai Suburban Adult Cohort and Biobank. CAP episodes were ascertained via ICD codes and clinical diagnoses. We calculated incidence rates before, during, and after NPIs, conducted subgroup analyses by age, sex, comorbidity and lifestyle. We used Poisson regression to compare stages, and Cox models to identify risk factors. The Overall CAP incidence was 42.1 per 1,000 person–years (95% CI 41.3–42.8). Incidence declined during NPIs (24.2/1,000 py) and rose after NPIs (95.9/1,000 py). The inpatient-to-outpatient ratio increased to 10.1% during NPIs and fell to 5.7% post–NPI. Among those without underlying conditions, rates were 40.1, 20.1 and 73.6/1,000 py before, during and after NPIs. Incidence was higher in participants ≥60 years and in those with multiple comorbidities, especially respiratory diseases. CAP burden temporarily fell during NPIs but resurged post–NPI, notably among high–risk groups. These findings highlight the need for targeted preventive strategies and continued CAP surveillance in the post-pandemic era.