Background: Cannabis will soon become legalized in Canada, and it is currently unclear how this will impact public health. Methadone maintenance treatment (MMT) is the most common pharmacological treatment for opioid use disorder (OUD), and despite its documented effectiveness, a large number of patients respond poorly and experience relapse to illicit opioids. Some studies implicate cannabis use as a risk factor for poor MMT response. Although it is well established that substance-use behaviors differ by sex, few of these studies have considered sex as a potential moderator. The current study aims to investigate sex differences in the association between cannabis use and illicit opioid use in a cohort of MMT patients. Methods: This multicentre study recruited participants on MMT for OUD from Canadian Addiction Treatment Centre sites in Ontario, Canada. Sex differences in the association between any cannabis use and illicit opioid use were investigated using multivariable logistic regression. A secondary analysis was conducted to investigate the association with heaviness of cannabis use. Results: The study included 414 men and 363 women with OUD receiving MMT. Cannabis use was significantly associated with illicit opioid use in women only (OR = 1.82, 95% CI 1.18, 2.82, p = 0.007). Heaviness of cannabis use was not associated with illicit opioid use in men or women. Conclusions: This is the largest study to date examining the association between cannabis use and illicit opioid use. Cannabis use may be a sex-specific predictor of poor response to MMT, such that women are more likely to use illicit opioids if they also use cannabis during treatment. Women may show improved treatment outcomes if cannabis use is addressed during MMT.