AbstractBackgroundCancer is currently the second leading cause of death globally. There is much uncertainty regarding the comparative risks of new‐onset overall cancer and pre‐specified cancer for Type 2 diabetes mellitus (T2DM) patients on sodium‐glucose cotransporter 2 inhibitors (SGLT2I) versus DPP4I.MethodsThis population‐based cohort study patients included patients who were diagnosed with T2DM and administered either SGLT2 or DPP4 inhibitors between 1 January 2015 and 31 December 2020 in public hospitals of Hong Kong.ResultsThis study included 60,112 T2DM patients (mean baseline age: 62.1 ± 12.4 years, male: 56.36%), of which 18,167 patients were SGLT2I users and 41,945 patients were dipeptidyl peptidase 4 inhibitor (DPP4I) users. Multivariable Cox regression found that SGLT2I use was associated with lower risks of all‐cause mortality (HR: 0.92; 95% CI: 0.84–0.99;p= 0.04), cancer‐related mortality (HR: 0.58; 95% CI: 0.42–0.80;p≤ 0.001) and new diagnoses of any cancer (HR: 0.70; 95% CI: 0.59–0.84;p≤ 0.001). SGLT2I use was associated with a lower risk of new‐onset breast cancer (HR: 0.51; 95% CI: 0.32–0.80;p≤ 0.001), but not of other malignancies. Subgroup analysis on the type of SGLT2I, dapagliflozin (HR: 0.78; 95% CI: 0.64–0.95;p= 0.01) and ertugliflozin (HR: 0.65; 95% CI: 0.43–0.98;p= 0.04) use was associated with lower risks of new cancer diagnosis. Dapagliflozin use was also linked to lower risks of breast cancer (HR: 0.48; 95% CI: 0.27–0.83;p= 0.001).ConclusionSodium‐glucose cotransporter 2 inhibitor use was associated with lower risks of all‐cause mortality, cancer‐related mortality and new‐onset overall cancer compared to DPP4I use after propensity score matching and multivariable adjustment.