Background: Hair glucocorticoids (GCs) offer a retrospective view on chronic GC exposure. We assessed whether maternal pre- and postnatal stress was associated with neonatal and maternal hair GCs postpartum (pp). Methods: On the first day pp 172 mother-infant pairs donated hair, of whom 67 had consulted a centre of expertise for psychiatric disorders during pregnancy. Maternal stress was scored on the Hospital Anxiety and Depression Scale during the first/second (n = 46), third trimester (n = 57), and pp (n = 172). Hair cortisol and cortisone levels were determined by liquid chromatography-tandem mass spectrometry, and associations with maternal hospital anxiety subscale (HAS) and hospital depression subscale (HDS) scores, and antidepressant use were analyzed with linear regression. Results: Neonatal hair GCs were negatively associated with elevated HAS-scores during the first/second trimester, log 10 (β [95% CI]) cortisol –0.19 (–0.39 to 0.02) p = 0.07, cortisone –0.10 (–0.25 to 0.05) p = 0.17; third trimester, cortisol –0.17 (–0.33 to 0.00) p = 0.05, cortisone –0.17 (–0.28 to –0.05) p = 0.01; and pp, cortisol –0.14 (–0.25 to –0.02) p = 0.02, cortisone –0.07 (–0.16 to 0.02) p = 0.10. A similar pattern was observed for elevated HDS-scores. Maternal hair GCs were positively associated with elevated HAS-scores pp (cortisol 0.17 [0.01 to 0.32] p = 0.04, cortisone 0.18 [0.06 to 0.31] p = 0.01), but not prenatally or with elevated HDS-scores. Antidepressant use was associated with elevated maternal hair GCs (p ≤ 0.05), but not with neonatal hair GCs. Conclusion: Exposure to excessive pre- and perinatal maternal stress was associated with a decrease in neonatal hair GCs, while elevated stress-scores around birth were associated with increased maternal hair GCs and elevated stress-scores earlier in gestation were not associated with maternal hair GCs pp. Further studies are needed to test associations with infant neurodevelopment.