Obsessive-compulsive disorder (OCD) is associated with adverse health-related outcomes. However, pregnancy and neonatal outcomes among women with OCD have been sparsely studied. To evaluate associations of maternal OCD with pregnancy, delivery, and neonatal outcomes. Two register-based cohort studies in Sweden and British Columbia (BC), Canada, included all singleton births at 22 weeks or more of gestation between January 1, 1999 (Sweden), or April 1, 2000 (BC), and December 31, 2019. Statistical analyses were conducted between August 1, 2022, and February 14, 2023. Maternal OCD diagnosis recorded before childbirth and use of serotonin reuptake inhibitors (SRIs) during pregnancy. Pregnancy and delivery outcomes examined were gestational diabetes, preeclampsia, maternal infection, antepartum hemorrhage or placental abruption, premature rupture of membranes, induction of labor, mode of delivery, and postpartum hemorrhage. Neonatal outcomes included perinatal death, preterm birth, small for gestational age, low birth weight (<2500 g), low 5-minute Apgar score, neonatal hypoglycemia, neonatal jaundice, neonatal respiratory distress, neonatal infections, and congenital malformations. Multivariable Poisson log-linear regressions estimated crude and adjusted risk ratios (aRRs). In the Swedish cohort, sister and cousin analyses were performed to account for familial confounding. In the Swedish cohort, 8312 pregnancies in women with OCD (mean [SD] age at delivery, 30.2 [5.1] years) were compared with 2 137 348 pregnancies in unexposed women (mean [SD] age at delivery, 30.2 [5.1] years). In the BC cohort, 2341 pregnancies in women with OCD (mean [SD] age at delivery, 31.0 [5.4] years) were compared with 821 759 pregnancies in unexposed women (mean [SD] age at delivery, 31.3 [5.5] years). In Sweden, maternal OCD was associated with increased risks of gestational diabetes (aRR, 1.40; 95% CI, 1.19-1.65) and elective cesarean delivery (aRR, 1.39; 95% CI, 1.30-1.49), as well as preeclampsia (aRR, 1.14; 95% CI, 1.01-1.29), induction of labor (aRR, 1.12; 95% CI, 1.06-1.18), emergency cesarean delivery (aRR, 1.16; 95% CI, 1.08-1.25), and postpartum hemorrhage (aRR, 1.13; 95% CI, 1.04-1.22). In BC, only emergency cesarean delivery (aRR, 1.15; 95% CI, 1.01-1.31) and antepartum hemorrhage or placental abruption (aRR, 1.48; 95% CI, 1.03-2.14) were associated with significantly higher risk. In both cohorts, offspring of women with OCD were at elevated risk of low Apgar score at 5 minutes (Sweden: aRR, 1.62; 95% CI, 1.42-1.85; BC: aRR, 2.30; 95% CI, 1.74-3.04), as well as preterm birth (Sweden: aRR, 1.33; 95% CI, 1.21-1.45; BC: aRR, 1.58; 95% CI, 1.32-1.87), low birth weight (Sweden: aRR, 1.28; 95% CI, 1.14-1.44; BC: aRR, 1.40; 95% CI, 1.07-1.82), and neonatal respiratory distress (Sweden: aRR, 1.63; 95% CI, 1.49-1.79; BC: aRR, 1.47; 95% CI, 1.20-1.80). Women with OCD taking SRIs during pregnancy had an overall increased risk of these outcomes, compared with those not taking SRIs. However, women with OCD not taking SRIs still had increased risks compared with women without OCD. Sister and cousin analyses showed that at least some of the associations were not influenced by familial confounding. These cohort studies suggest that maternal OCD was associated with an increased risk of adverse pregnancy, delivery, and neonatal outcomes. Improved collaboration between psychiatry and obstetric services and improved maternal and neonatal care for women with OCD and their children is warranted.