The effects of sodium-glucose co-transporter 2 inhibitors (SGLT-2i) on dementia risk have not been assessed in the Chinese population. We aimed to assess the association between the use of SGLT-2i and dementia incidence in a mainland Chinese population. A target trial of SGLT-2i vs. dipeptidyl peptidase 4 inhibitors (DPP-4i) was emulated, with cohorts of type 2 diabetes mellitus patients who were new users of SGLT-2i or DPP-4i being assembled using the Yinzhou Regional Health Care Database. Inverse probability of treatment weighting (IPTW) was applied to control potential confounding, and a Cox model was used to estimate the hazard ratio (HR) of the association between the use of SGLT-2i and incident dementia. The final cohort included 47 335 new users of DPP-4i or SGLT-2i. In the primary analysis, the incidence of dementia was 500.2 and 347.5 per 100 000 person-years in users of DPP-4i and SGLT-2i, respectively. SGLT-2i use was associated with a reduced risk of incident dementia after adjusting for potential confounding using IPTW, with an HR of 0.74 (95% CI, 0.60-0.93). The results were generally consistent in various subgroup analyses and sensitivity analyses. The use of SGLT-2i is associated with a decreased risk of dementia incidence in the study population in mainland China.