Cannabis use is growing in the US and is increasingly perceived as harmless. However, the perioperative impact of cannabis use remains uncertain. To assess whether cannabis use disorder is associated with increased morbidity and mortality after major elective, inpatient, noncardiac surgery. This retrospective, population-based, matched cohort study used data from the National Inpatient Sample for adult patients aged 18 to 65 years who underwent major elective inpatient surgery (including cholecystectomy, colectomy, inguinal hernia repair, femoral hernia repair, mastectomy, lumpectomy, hip arthroplasty, knee arthroplasty, hysterectomy, spinal fusion, and vertebral discectomy) from January 2016 to December 2019. Data were analyzed from February to August 2022. Cannabis use disorder, as defined by the presence of specific International Statistical Classification of Diseases and Related Health Problems, Tenth Revision (ICD-10) diagnostic codes. The primary composite outcome was in-hospital mortality and 7 major perioperative complications (myocardial ischemia, acute kidney injury, stroke, respiratory failure, venous thromboembolism, hospital-acquired infection, and surgical procedure-related complications) based on ICD-10 discharge diagnosis codes. Propensity score matching was performed to create a 1:1 matched cohort that was well balanced with respect to covariates, which included patient comorbidities, sociodemographic factors, and procedure type. Among 12 422 hospitalizations, a cohort of 6211 patients with cannabis use disorder (median age, 53 years [IQR, 44-59 years]; 3498 [56.32%] male) were matched with 6211 patients without cannabis use disorder for analysis. Cannabis use disorder was associated with an increased risk of perioperative morbidity and mortality compared with hospitalizations without cannabis use disorder in adjusted analysis (adjusted odds ratio, 1.19; 95% CI, 1.04-1.37; P = .01). The outcome occurred more frequently in the group with cannabis use disorder (480 [7.73%]) compared with the unexposed group (408 [6.57%]). In this cohort study, cannabis use disorder was associated with a modest increased risk of perioperative morbidity and mortality after major elective, inpatient, noncardiac surgery. In the context of increasing cannabis use rates, our findings support preoperative screening for cannabis use disorder as a component of perioperative risk stratification. However, further research is needed to quantify the perioperative impact of cannabis use by route and dosage and to inform recommendations for preoperative cannabis cessation.