The association between remnant cholesterol (remnant-C) and cardiovascular disease risk is well established, but its association with dementia remains unclear. We aimed to examine this association using a large-scale population dataset. We did a nationwide, population-based cohort study in which we identified participants aged 40 years and older who underwent the national health examination in 2009 from South Korea's National Health Insurance Service. We excluded people who were younger than 40 years and those with a triglyceride concentration of 400 mg/dL or higher due to concerns regarding the accuracy of calculated low-density lipoprotein cholesterol concentration in individuals with extremely high triglyceride concentrations. People who were previously diagnosed with dementia before the index date, and those who had any missing variables were also excluded. To minimise the influence of possible reverse causation, we excluded individuals who had developed any type of dementia within 1 year of the baseline measurements. We calculated hazard ratios (HRs) for all-cause dementia, Alzheimer's disease, and vascular dementia in each quartile of remnant-C using the Cox proportional hazards model adjusted for age, sex, body-mass index, estimated glomerular filtration rate, income level, smoking status, alcohol consumption, regular exercise, diabetes, hypertension, statin and fibrate use, and total cholesterol concentrations. We also did subgroup analyses to investigate the association between remnant-C and the risk of dementia stratified by age, sex, obesity, glycaemic status (normoglycaemia, impaired fasting glucose, new-onset type 2 diabetes, type 2 diabetes with a duration of less than 5 years, and type 2 diabetes with a duration of 5 years or more), hypertension, chronic kidney disease, and dyslipidaemia, using likelihood ratio tests. 4 234 415 individuals who underwent the national health examination in 2009 were deemed eligible for inclusion. We excluded 1 612 819 individuals on the basis of age, triglyceride concentration, missing variables, or having dementia at baseline. We identified 2 621 596 participants aged 40 years and older (1 305 556 men and 1 316 040 women) who underwent the national health examination and followed them up until the date of any incident of dementia or the end of the study period of Dec 31, 2020. During a median follow-up of 10·3 years (IQR 10·1-10·6), 146 991 (5·6%) participants developed all-cause dementia, 117 739 (4·5%) developed Alzheimer's disease, and 14 536 (0·6%) developed vascular dementia. The risk of dementia increased progressively with higher remnant-C concentrations. Compared with the lowest quartile of remnant-C (quartile 1), HRs in the highest quartile (quartile 4) were 1·11 (95% CI 1·09-1·13) for all-cause dementia, 1·11 (1·08-1·13) for Alzheimer's disease, and 1·15 (1·09-1·21) for vascular dementia. Subgroup analyses revealed that the risk of dementia associated with high remnant-C concentrations was higher in middle-aged people aged 40-59 years than in older people. The risk of dementia associated with high concentrations of remnant-C was notably more pronounced in individuals with diabetes compared with those without diabetes, and the risk increased steeply with a longer duration of diabetes. Results showed that higher remnant-C concentrations were independently associated with increased risks of all-cause dementia, Alzheimer's disease, and vascular dementia. More research is needed to determine the mechanisms underlying this finding. Monitoring and managing higher concentrations of remnant-C might have important implications for reducing the risk of dementia. None.