ObjectivesTo examine neonates in Scotland aged 0–27 days with SARS-CoV-2 infection confirmed by viral testing; the risk of confirmed neonatal infection by maternal and infant characteristics; and hospital admissions associated with confirmed neonatal infections.DesignPopulation-based cohort study.Setting and populationAll live births in Scotland, 1 March 2020–31 January 2022.ResultsThere were 141 neonates with confirmed SARS-CoV-2 infection over the study period, giving an overall infection rate of 153 per 100 000 live births (141/92 009, 0.15%). Among infants born to women with confirmed infection around the time of birth, the confirmed neonatal infection rate was 1812 per 100 000 live births (15/828, 1.8%). Two-thirds (92/141, 65.2%) of neonates with confirmed infection had an associated admission to neonatal or (more commonly) paediatric care. Six of these babies (6/92, 6.5%) were admitted to neonatal and/or paediatric intensive care; however, none of these six had COVID-19 recorded as their main diagnosis. There were no neonatal deaths among babies with confirmed infection.Implications and relevanceConfirmed neonatal SARS-CoV-2 infection was uncommon over the first 23 months of the pandemic in Scotland. Secular trends in the neonatal confirmed infection rate broadly followed those seen in the general population, although at a lower level. Maternal confirmed infection at birth was associated with an increased risk of neonatal confirmed infection. Two-thirds of neonates with confirmed infection had an associated admission to hospital, with resulting implications for the baby, family and services, although their outcomes were generally good. Ascertainment of confirmed infection depends on the extent of testing, and this is likely to have varied over time and between groups: the extent of unconfirmed infection is inevitably unknown.