Severe maternal morbidity (SMM) can have long-term health consequences for the affected mother. The association between SMM and future maternal mental health conditions has not been well studied. To assess the association between SMM in the first recorded birth and the risk of hospitalization or emergency department (ED) visits for a mental health condition over a 13-year period. This population-based retrospective cohort study used data from postpartum individuals aged 18 to 55 years with a first hospital delivery between 2008 and 2021 in 11 provinces and territories in Canada, except Québec. Data were analyzed from January to June 2023. SMM, defined as a composite of conditions, such as septic shock, severe preeclampsia or eclampsia, severe hemorrhage with intervention, or other complications, occurring after 20 weeks' gestation and up to 42 days after a first delivery. The main outcome was a hospitalization or ED visit for a mental health condition, including mood and anxiety disorders, substance use, schizophrenia, and other psychotic disorder, or suicidality or self-harm event, arising at least 43 days after the first birth hospitalization. Cox regression models generated hazard ratios with 95% CIs, adjusted for baseline maternal comorbidities, maternal age at delivery, income quintile, type of residence, hospital type, and delivery year. Of 2 026 594 individuals with a first hospital delivery, 1 579 392 individuals (mean [SD] age, 30.0 [5.4] years) had complete ED and hospital records and were included in analyses; among these, 35 825 individuals (2.3%) had SMM. Compared with individuals without SMM, those with SMM were older (mean [SD] age, 29.9 [5.4] years vs 30.7 [6.0] years), were more likely to deliver in a teaching tertiary care hospital (40.8% vs 51.1%), and to have preexisting conditions (eg, ≥2 conditions: 1.2% vs 5.3%), gestational diabetes (8.2% vs 11.7%), stillbirth (0.5% vs 1.6%), preterm birth (7.7% vs 25.0%), or cesarean delivery (31.0% vs 54.3%). After a median (IQR) duration of 2.6 (1.3-6.4) years, 1287 (96.1 per 10 000) individuals with SMM had a mental health hospitalization or ED visit, compared with 41 779 (73.2 per 10 000) individuals without SMM (adjusted hazard ratio, 1.26 [95% CI, 1.19-1.34]). In this cohort study of postpartum individuals with and without SMM in pregnancy and delivery, there was an increased risk of mental health hospitalizations or ED visits up to 13 years after a delivery complicated by SMM. Enhanced surveillance and provision of postpartum mental health resources may be especially important after SMM.