Objective: To examine whether maternal opioid treatment after delivery is associated with an increased risk of adverse infant outcomes. Design: Population based cohort study. Setting: Ontario, Canada. Participants: 865 691 mother-infant pairs discharged from hospital alive within seven days of delivery from 1 September 2012 to 31 March 2020. Each mother who filled an opioid prescription within seven days of discharge was propensity score matched to a mother who did not.