ImportanceFactors associated with the risk of dementia remain to be fully understood. Systemic infections are hypothesized to be such factors and may be targets for prevention and screening.ObjectiveTo investigate the association between hospitalization with infection and incident dementia.Design, Setting, and ParticipantsData from the community-based Atherosclerosis Risk in Communities (ARIC) study, a prospective cohort study, were used. Enrollment occurred at 4 research centers in the US, initiated in 1987 to 1989. The present study includes data up to 2019, for 32 years of follow-up. Data analysis was performed from April 2021 to June 2022.ExposuresHospitalizations with infections were identified via medical record review for selected International Classification of Diseases, Ninth Revision (ICD-9) and International Statistical Classification of Diseases and Related Health Problems, Tenth Revision (ICD-10) codes, from baseline until administrative censoring or dementia diagnosis. Participants were considered unexposed until first hospitalization with infection and exposed thereafter. Selected infection subtypes were also considered.Main Outcomes and MeasuresIncident dementia and time-to-event data were identified through surveillance of ICD-9 and ICD-10 hospitalization and death certificate codes, in-person assessments, and telephone interviews. A sensitivity analysis was conducted excluding cases occurring within 3 years or beyond 20 years from exposure. Data were collected before study hypothesis formulation.ResultsOf the 15 792 ARIC study participants, an analytical cohort of 15 688 participants who were dementia free at baseline and of Black or White race were selected (8658 female [55.2%]; 4210 Black [26.8%]; mean [SD] baseline age, 54.7 [5.8] years). Hospitalization with infection occurred among 5999 participants (38.2%). Dementia was ascertained in 2975 participants (19.0%), at a median (IQR) of 25.1 (22.2-29.1) years after baseline. Dementia rates were 23.6 events per 1000 person-years (95% CI, 22.3-25.0 events per 1000 person-years) among the exposed and 5.7 events per 1000 person-years (95% CI, 5.4-6.0 events per 1000 person-years) among the unexposed. Patients hospitalized with infection were 2.02 (95% CI, 1.88-2.18; P < .001) and 1.70 (95% CI, 1.55-1.86; P < .001) times more likely to experience incident dementia according to unadjusted and fully adjusted Cox proportional hazards models compared with individuals who were unexposed. When excluding individuals who developed dementia less than 3 years or more than 20 years from baseline or the infection event, the adjusted hazard ratio was 5.77 (95% CI, 4.92-6.76; P < .001). Rates of dementia were significantly higher among those hospitalized with respiratory, urinary tract, skin, blood and circulatory system, or hospital acquired infections. Multiplicative and additive interactions were observed by age and APOE-ε genotype.Conclusions and RelevanceHigher rates of dementia were observed among participants who experienced hospitalization with infection. These findings support the hypothesis that infections are factors associated with higher risk of dementias.