BACKGROUND: Antenatal corticosteroids reduce respiratory morbidity in preterm infants, but their use during late preterm gestation (34-36 weeks) is limited because their safety for longer-term child neurodevelopment is unclear. We sought to determine if fetuses with higher probability of exposure to antenatal corticosteroids had increased rates of prescriptions for attention-deficit/hyperactivity disorder (ADHD) medication in childhood, using a quasiexperimental design that better controls for confounding than existing observational studies. METHODS: We identified 16 358 children whose birthing parents were admitted for delivery between 31 + 0 (31 weeks, 0 days) and 36 + 6 weeks' gestation in 2000-2013, using a perinatal data registry from British Columbia, Canada, and linked their records with population-based child ADHD medication data (2000-2018). We used a regression discontinuity design to capitalize on the fact that pregnancies presenting for delivery immediately before and immediately after the clinical cut-off for antenatal corticosteroid administration of 34 + 0 weeks' gestation have very different levels of exposure to corticosteroids, but are otherwise similar with respect to confounders. RESULTS: Over a median follow-up period of 9 years, 892 (5.5%) children had 1 or more dispensations of ADHD medication. Children whose birthing parents were admitted for delivery just before the corticosteroid clinical cut-off of 34 + 0 weeks' gestation did not appear to be more likely to be prescribed ADHD medication than those admitted just after the cut-off (rate ratio 1.1, 95% confidence interval [CI] 0.8 to 1.6; 1.3 excess cases per 100 children, 95% CI -2.5 to 5.7). INTERPRETATION: We found little evidence that children with higher probability of exposure to antenatal corticosteroids have higher rates of ADHD prescriptions in childhood, supporting the safety of antenatal corticosteroids for this neurodevelopmental outcome.