Little research exists regarding the relationships between green space and postpartum depression (PPD). We aimed to investigate the relationships between PPD and green space exposure, and the mediating role of physical activity (PA). Clinical data were obtained from Kaiser Permanente Southern California electronic health records in 2008-2018. PPD ascertainment was based on both diagnostic codes and prescription medications. Maternal residential green space exposures were assessed using street view-based measures and vegetation types (i.e., street tree, low-lying vegetation, and grass), satellite-based measures [i.e., Normalized Difference Vegetation Index (NDVI), land-cover green space, and tree canopy cover], and proximity to the nearest park. Multilevel logistic regression was applied to estimate the association between green space and PPD. A causal mediation analysis was performed to estimate the proportion mediated by PA during pregnancy in the total effects of green space on PPD. In total, we included 415,020 participants (30.2±5.8 years) with 43,399 (10.5%) PPD cases. Hispanic mothers accounted for about half of the total population. A reduced risk for PPD was associated with total green space exposure based on street-view measure [500 m buffer, adjusted odds ratio (OR) per interquartile range: 0.98, 95% CI: 0.97-0.99], but not NDVI, land-cover greenness, or proximity to a park. Compared to other types of green space, tree coverage showed stronger protective effects (500 m buffer, OR=0.98, 95% CI: 0.97-0.99). The proportions of mediation effects attributable to PA during pregnancy ranged from 2.7% to 7.2% across green space indicators. Street view-based green space and tree coverage were associated with a decreased risk of PPD. The observed association was primarily due to increased tree coverage, rather than low-lying vegetation or grass. Increased PA was a plausible pathway linking green space to lower risk for PPD. National Institute of Environmental Health Sciences (NIEHS; R01ES030353).