ImportanceFor some low-income people, access to care during pregnancy is not guaranteed through Medicaid, based on their immigration status. While states have the option to extend Emergency Medicaid coverage for prenatal and postpartum care, many states have not expanded coverage.ObjectiveTo determine whether receipt of first prenatal care services and subsequently receipt of postpartum care through extensions of Emergency Medicaid coverage were associated with increases in diagnosis and treatment of perinatal mental health conditions.Design, Setting, and ParticipantsThis cohort study used linked Medicaid claims and birth certificate data from 2010 to 2020 with a difference-in-difference design to compare the rollout of first prenatal care coverage in 2013 and then postpartum services in Oregon in 2018 with a comparison state, South Carolina, which did not cover prenatal or postpartum care as part of Emergency Medicaid and only covered emergent conditions and obstetric hospital admissions. Medicaid claims and birth certificate data were linked by Medicaid identification number prior to receipt by the study team. Participants included recipients of Emergency Medicaid who gave birth in Oregon or South Carolina. Data were analyzed from April 1 to October 15, 2023.ExposureMedicaid coverage of prenatal care and Medicaid coverage of postpartum care.Main Outcomes and MeasuresThe main outcome was the diagnosis of a perinatal mental health condition within 60 days postpartum. Secondary outcomes included treatment of a mood disorder with medication or talk therapy.ResultsThe study sample included 43 889 births to Emergency Medicaid recipients who were mainly aged 20 to 34 years (32 895 individuals [75.0%]), multiparous (33 887 individuals [77.2%]), and living in metropolitan areas (32 464 individuals [74.0%]). Following Oregon’s policy change to offer prenatal coverage to pregnant individuals through Emergency Medicaid, there was a significant increase in diagnosis frequency (4.1 [95% CI, 1.7-6.5] percentage points) and a significant difference between states in treatment for perinatal mental health conditions (27.3 [95% CI, 13.2-41.4] percentage points). Postpartum Medicaid coverage (in addition to prenatal Medicaid coverage) was associated with an increase of 2.6 (95% CI, 0.6-4.6) percentage points in any mental health condition being diagnosed, but there was no statistically significant difference in receipt of mental health treatment.Conclusions and RelevanceThese findings suggest that changing Emergency Medicaid policy to include coverage for prenatal and 60 days of postpartum care for immigrants is foundational to improving maternal mental health. Expanded postpartum coverage length, or culturally competent interventions, may be needed to optimize receipt of postpartum treatment.