BackgroundCurrent evidence of the association between the use of sulfonylurea and cancer risk is highly conflicting and little evidence of this association is from the mainland Chinese population. This study aimed to evaluate the potential effects of sulfonylurea use on cancer risk among patients with type 2 diabetes mellitus (T2DM).MethodsA retrospective cohort study of T2DM patients who were new users of sulfonylurea or metformin was conducted using the Yinzhou Regional Health Care Database. A marginal structural Cox model was used to estimate the hazard ratio (HR) of cancer associated with the use of sulfonylurea compared with metformin, with time-varying confounders controlled by inverse probability weighting. Secondary analyses using different glucose-lowering drugs (GLDs) as comparator and sensitivity analyses for potential bias due to latency period, model misspecification, missing data, analyses strategy (intention-to-treat and per-protocol), and diagnosis validation were performed to examine the robustness of the results.ResultsAfter fully controlling for time-varying confounding, baseline confounding, and competing risk, the use of sulfonylurea was not associated with the risk of any cancer (HR 1.09; 95% CI, 0.93–1.27), compared with the use of metformin. In the secondary analyses, compared with α - glucosidase inhibitors, thiazolidinediones, glinides, other GLDs except sulfonylure and insulin, and T2DM patients not treated with sulfonylureas, the HRs of the association between sulfonylurea use and cancer risk were 0.92 (95% CI; 0.78–1.08), 0.89 (95% CI; 0.66–1.19), 0.85 (95% CI; 0.71–1.02), 1.04 (95% CI; 0.89–1.22), and 1.07 (95% CI; 0.99–1.16), respectively. The results of analyses for various subgroups, risk of site-specific cancers, cumulative duration, dose-response relationship, and sensitivity analyses of different latency periods and missing data were generally consistent with the findings of the primary analyses.ConclusionNo association between sulfonylurea use and cancer risk was found in this study after properly controlling biases due to time-varying confounders and other sources. Further studies on the association between sulfonylurea use and the risk of cancer by using data from a Chinese population with higher representativeness are needed.