SummaryBackgroundIdentifying independent and interactive associations of a wide range of diseases and multimorbidity and apolipoprotein E4 (APOE4) with dementia may help promote cognitive health. The main aim of the present study was to investigate associations of such diseases and their multimorbidity with incident dementia.MethodsIn this retrospective cohort study, we included 471,485 individuals of European ancestry from the UK Biobank, aged 38–73 years at baseline (2006–10). Dementia was identified using inpatient records and death registers. The follow-up period was between March 16, 2006, and Jan 31, 2021.FindingsDuring a median follow-up of 11·9 years, 6189 cases of incident all-cause dementia (503 young-onset cases, 5686 late-onset cases) were documented. In multivariable-adjusted analysis, 33 out of 63 major diseases were associated with an increased risk of dementia. The hazard ratio (HR [95% CI]) ranged from 1·12 (1·06–1·19) for obesity to 14·22 (12·33–16·18) for Parkinson's disease. In addition to conventional diseases, respiratory disorders, musculoskeletal disorders, digestive disorders, painful conditions, and chronic kidney disease were associated with increased dementia risk. A larger HR for dementia was observed for a larger number of diseases (3·97 [3·51–4·48] for ≥6 diseases versus no disease). These individual diseases and multimorbidity were more predictive of young-onset dementia than of late-onset dementia. Dementia risk score incorporating multimorbidity, age, and APOE4 status had strong prediction performance (area under the curve [95% CI]: 82·2% [81·7–82·7%]). APOE4 was more predictive of late-onset dementia (HR [95% CI]: 2·90 [2·75–3·06]) than of young-onset dementia (1·26 [1·03–1·54]). Associations of painful conditions, depression, obesity, diabetes, stroke, Parkinson's disease, high cholesterol, and their multimorbidity with incident dementia were stronger among non-APOE4 carriers.InterpretationBesides conventional diseases, numerous diseases are associated with an increased risk of dementia. These individual diseases and multimorbidity are more predictive of young-onset dementia, whereas APOE4 is more predictive of late-onset dementia. Individual diseases and multimorbidity are stronger predictors of dementia in non-APOE4 carriers. Although multiple risk factors have been adjusted for in the analysis, potential confounding from unknown factors may have biased the associations.FundingThe Fundamental Research Funds of the State Key Laboratory of Ophthalmology, Project of Investigation on Health Status of Employees in Financial Industry in Guangzhou, China (Z012014075), Science and Technology Program of Guangzhou, China (202,002,020,049).