Background and aimsColorectal cancer (CRC) is a significant global health concern, with studies estimating a rise in new cases to 2.5 million by 2035. Type 2 diabetes (T2D) is also a growing issue, with an estimated 642 million adults affected by 2040. However, the relationship between T2D, its medications, and CRC remains unclear.Materials and methodsThis case-control study includes 810 controls without CRC and 684 cases with CRC admitted to Rasoul-Akram and Firouzgar Hospitals from September 2019 to 2023. Adjusted and unadjusted odds ratios (OR) were calculated to investigate the effect of T2D and sulfonylurea consumption on the chance of CRC development, using univariate and multivariate logistic regression analyses. The relationship between T2D and the clinicopathological features of the tumor was investigated.ResultsThe results show that the effect of T2D on CRC is significant based on unadjusted OR (OR = 1.39, CI = 1.07, 1.81) and insignificant in adjusted OR (OR = 0.67, CI = 0.37, 1.20). The effect of sulfonylurea consumption on CRC was significant in both unadjusted (OR = 2.39, CI = 1.40, 4.09) and adjusted ORs (OR = 2.35, CI = 1.12, 4.91). All analyses related to the relationship between T2D and tumor clinicopathological characteristics were insignificant.ConclusionThis study found an insignificant association between type 2 diabetes and the chance of CRC development in an adjusted state. Sulfonylurea consumption was also associated with a higher chance of CRC development among patients with T2D. These findings have implications for clinical practice and public health strategies in CRC prevention for patients with T2D.