Dengue infection can affect the central nervous system and cause various neurological complications. Previous studies also suggest dengue was associated with a significantly increased long-term risk of dementia. A population-based cohort study was conducted using national health databases in Taiwan and included 37,928 laboratory-confirmed dengue patients aged ≥ 45 years between 2002 and 2015, along with 151,712 matched nondengue individuals. Subdistribution hazard regression models showed a slightly increased risk of Alzheimer’s disease, and unspecified dementia, non-vascular dementia, and overall dementia in dengue patients than the nondengue group, adjusted for age, sex, area of residence, urbanization level, income, comorbidities, and all-cause clinical visits within one year before the index date. After considering multiple comparisons using Bonferroni correction, only overall dementia and non-vascular dementia remained statistically significant (adjusted SHR 1.13, 95% CI 1.05–1.21, p = 0.0009; E-value 1.51, 95% CI 1.28-NA). Sensitivity analyses in which dementia cases occurring in the first three or five years after the index dates were excluded revealed no association between dengue and dementia. In conclusion, this study found dengue patients had a slightly increased risk of non-vascular dementia and total dementia than those without dengue. However, the small corresponding E-values and sensitivity analyses suggest the association between dengue and dementia may not be causal.