This cross-sectional study examined associations between prenatal cannabis use and prescribed psychotropic medication use among pregnant patients with depression or anxiety in a large, integrated healthcare system. Study patients had a confirmed pregnancy and a depressive or anxiety disorder defined by International Classification of Diseases codes between 2012 and 2018 at Kaiser Permanente Northern California. Patients were screened for prenatal substance use via a self-reported questionnaire and urine toxicology test as part of standard prenatal care. Generalized estimating equation models tested for associations between prenatal cannabis use and any dispensation of antidepressants, benzodiazepines, and hypnotics during gestation. Models were stratified by diagnosis (depression or anxiety) and depression symptom severity. This study included 35,047 pregnancies (32,278 patients; 17.6% aged <25 years, 48.1% non-Hispanic White). Adjusting for patient age, income, race/ethnicity, and depression symptom severity, the 12.6% of patients who screened positive for prenatal cannabis use demonstrated higher odds of prenatal benzodiazepine (adjusted odds ratios [aOR] = 1.40; 95% confidence interval [CI] = 1.20-1.62) and hypnotic (aOR = 1.28; 95% CI = 1.11-1.48), but not antidepressants (aOR = 1.05, 95% CI = 0.96-1.14) use. This pattern persisted when diagnostic groups were examined separately. The odds of prenatal benzodiazepine and hypnotic use associated with prenatal cannabis use were higher among pregnancies with severe depression symptom severity (31.8% of the sample). Among pregnant patients with depression or anxiety, prenatal cannabis use was associated with higher odds of prenatal benzodiazepine and hypnotic use. As patients may be using cannabis to address depression and anxiety, prescribers should remain vigilant for under- or untreated psychiatric symptoms among pregnant patients and provide evidence-based treatments.