ImportanceThirteen human malignant neoplasms have been identified as obesity-associated cancers (OACs), ie, the presence of excess body fat is associated with increased risk of developing cancer and worse prognosis in patients with these specific tumors. The glucagon-like peptide receptor agonist (GLP-1RA) class of pharmaceuticals are effective agents for the treatment of type 2 diabetes (T2D) and for achieving weight loss, but the association of GLP-1RAs with the incident risk of 13 OACs is unclear.ObjectiveTo compare the incident risk of each of the 13 OACs in patients with T2D who were prescribed GLP-1RAs vs insulins or metformin.Design, Setting, and ParticipantsThis retrospective cohort study was based on a nationwide multicenter database of electronic health records (EHRs) of 113 million US patients. The study population included 1 651 452 patients with T2D who had no prior diagnosis of OACs and were prescribed GLP-1RAs, insulins, or metformin during March 2005 to November 2018. Data analysis was conducted on April 26, 2024.ExposuresPrescription of GLP-1RAs, insulins, or metformin.Main Outcomes and MeasuresIncident (first-time) diagnosis of each of the 13 OACs occurring during a 15-year follow-up after the exposure was examined using Cox proportional hazard and Kaplan-Meier survival analyses with censoring applied. Hazard ratios (HRs), cumulative incidences, and 95% CIs were calculated. All models were adjusted for confounders at baseline by propensity-score matching baseline covariates.ResultsIn the study population of 1 651 452 patients with T2D (mean [SD] age, 59.8 [15.1] years; 827 873 [50.1%] male and 775 687 [47.0%] female participants; 5780 [0.4%] American Indian or Alaska Native, 65 893 [4.0%] Asian, 281 242 [17.0%] Black, 13 707 [0.8%] Native Hawaiian or Other Pacific Islander, and 1 000 780 [60.6%] White participants), GLP-1RAs compared with insulin were associated with a significant risk reduction in 10 of 13 OACs, including in gallbladder cancer (HR, 0.35; 95% CI, 0.15-0.83), meningioma (HR, 0.37; 95% CI, 0.18-0.74), pancreatic cancer (HR, 0.41; 95% CI, 0.33-0.50), hepatocellular carcinoma (HR, 0.47; 95% CI, 0.36-0.61), ovarian cancer (HR, 0.52; 95% CI, 0.03-0.74), colorectal cancer (HR, 0.54; 95% CI, 0.46-0.64), multiple myeloma (HR, 0.59; 95% CI, 0.44-0.77), esophageal cancer (HR, 0.60; 95% CI, 0.42-0.86), endometrial cancer (HR, 0.74; 95% CI, 0.60-0.91), and kidney cancer (HR, 0.76; 95% CI, 0.64-0.91). Although not statistically significant, the HR for stomach cancer was less than 1 among patients who took GLP-1RAs compared with those who took insulin (HR, 0.73; 95% CI, 0.51-1.03). GLP-1RAs were not associated with a reduced risk of postmenopausal breast cancer or thyroid cancer. Of those cancers that showed a decreased risk among patients taking GLP-1RAs compared with those taking insulin, HRs for patients taking GLP-1RAs vs those taking metformin for colorectal and gallbladder cancer were less than 1, but the risk reduction was not statistically significant. Compared with metformin, GLP-1RAs were not associated with a decreased risk of any cancers, but were associated with an increased risk of kidney cancer (HR, 1.54; 95% CI, 1.27-1.87).Conclusions and RelevanceIn this study, GLP-1RAs were associated with lower risks of specific types of OACs compared with insulins or metformin in patients with T2D. These findings provide preliminary evidence of the potential benefit of GLP-1RAs for cancer prevention in high-risk populations and support further preclinical and clinical studies for the prevention of certain OACs.