ImportanceWomen are especially vulnerable to mental health matters post partum because of biological, emotional, and social changes during this period. However, epidemiologic evidence of an association between air pollution exposure and postpartum depression (PPD) is limited.ObjectiveTo examine the associations between antepartum and postpartum maternal air pollution exposure and PPD.Design, Setting, and ParticipantsThis retrospective cohort study used data from Kaiser Permanente Southern California (KPSC) electronic health records and included women who had singleton live births at KPSC facilities between January 1, 2008, and December 31, 2016. Data were analyzed between January 1 and May 10, 2023.ExposuresAmbient air pollution exposures were assessed based on maternal residential addresses using monthly averages of particulate matter less than or equal to 2.5 μm (PM2.5), particulate matter less than or equal to 10 μm (PM10), nitrogen dioxide (NO2), and ozone (O3) from spatial interpolation of monitoring station measurements. Constituents of PM2.5 (sulfate, nitrate, ammonium, organic matter, and black carbon) were obtained from fine-resolution geoscience-derived models based on satellite, ground-based monitor, and chemical transport modeling data.Main Outcomes and MeasuresParticipants with an Edinburgh Postnatal Depression Scale score of 10 or higher during the 6 months after giving birth were referred to a clinical interview for further assessment and diagnosis. Ascertainment of PPD was defined using a combination of diagnostic codes and prescription medications.ResultsThe study included 340 679 participants (mean [SD] age, 30.05 [5.81] years), with 25 674 having PPD (7.54%). Increased risks for PPD were observed to be associated with per-IQR increases in antepartum and postpartum exposures to O3 (adjusted odds ratio [AOR], 1.09; 95% CI, 1.06-1.12), PM10 (AOR, 1.02; 95% CI, 1.00-1.04), and PM2.5 (AOR, 1.02; 95% CI, 1. 00-1.03) but not with NO2; PPD risks were mainly associated with PM2.5 organic matter and black carbon. Overall, a higher risk of PPD was associated with O3 during the entire pregnancy and postpartum periods and with PM exposure during the late pregnancy and postpartum periods.Conclusions and RelevanceThe study findings suggest that long-term exposure to antepartum and postpartum air pollution was associated with higher PPD risks. Identifying the modifiable environmental risk factors and developing interventions are important public health issues to improve maternal mental health and alleviate the disease burden of PPD.