Objective:Previous studies have shown that gabapentin or pregabalin use is associated with cognitive decline. Herein, we aimed to evaluate the association between gabapentin or pregabalin use and the risk of dementia.Methods:In this retrospective, population-based matched cohort study, all research data were collected from the 2005 Longitudinal Health Insurance Database, which contains data of 2 million people randomly selected from the National Health Insurance Research Database of Taiwan in 2005. The study extracted data from 1 January 2000, to 31 December 2017. Adult patients taking gabapentin or pregabalin were included in the exposure group, and patients not using gabapentin or pregabalin matched to exposure subjects in a 1:5 ratio by propensity scores composed of age, sex and index date were included in the non-exposure group.Results:A total of 206,802 patients were enrolled in the study. Of them, 34,467 gabapentin- or pregabalin-exposure and 172,335 non-exposure patients were used for analysis. The mean follow-up day (±standard deviation) after the index date was 1724.76 (±1282.32) and 1881.45 (±1303.69) in the exposure and non-exposure groups, respectively; the incidence rates of dementia were 980.60 and 605.48 per 100,000 person-years, respectively. The multivariate-adjusted hazard ratio of risk of dementia for gabapentin or pregabalin exposure versus the matched non-exposed group was 1.45 (95% confidence interval [CI], 1.36–1.55). The risk of dementia increased with higher cumulative defined daily doses during the follow-up period. Moreover, the stratification analysis revealed that the risk of dementia associated with gabapentin or pregabalin exposure was significant in all age subgroups; however, it was higher in younger patients (age <50) than in the older patients (hazard ratio, 3.16; 95% CI, 2.23–4.47).Conclusion:Patients treated with gabapentin or pregabalin had an increased risk of dementia. Therefore, these drugs should be used with caution, particularly in susceptible individuals.