Background: Paediatric and adolescent HIV treatment programmes in sub-Saharan Africa have rapidly expanded and evolved over the past decade. Real-world evidence of how the implementation of new policies over time has affected treatment outcomes is inadequate, but is crucial for guiding the implementation of the next phases of the HIV treatment response for children. We examined how treatment outcomes in Zambia's national paediatric and adolescent HIV treatment programmes have changed over time as new policies were implemented. Methods: We used data from Zambia's routine electronic health record to analyse children and adolescents living with HIV who were antiretroviral therapy (ART) naive between the ages of 0 and 19 years who were newly enrolled in care between Jan 1, 2011, and March 31, 2019, at 102 health facilities in Lusaka and Western provinces supported by the Centre for Infectious Disease Research in Zambia. Sociodemographic factors, clinical data, facility-level data, and visit history were obtained from the national electronic health record and laboratory systems used in routine HIV care in Zambia. We aimed to characterise the changes in the distribution of the age and sex of new enrolees over time. We used an interrupted time-series design to examine the rates of ART initiation, retention in care, time to ART initiation, and first-line ART regimens among new enrolees across different age strata as they changed over time with the adoption of new ART guidelines in 2014 and 2017. Findings: Between Jan 1, 2011, and March 31, 2019, 26 214 children and adolescents living with HIV who were ART naïve were newly enrolled at one of 102 ART facilities in two provinces in Zambia. Rates of new enrolees increased by 25–35% among children younger than 15 years over time, but by 92·3% between 2011 and 2017 among adolescents, with the largest absolute increase among adolescent girls. Rates of ART initiation increased steadily and in parallel across all age groups from before the implementation of the 2014 guidelines to after the implementation of the 2017 guidelines (<2 years, 42·4% for 2014 and 81·6% for 2017; 2 to <5 years, 39·3% for 2014 and 82·8% for 2017; 5 to <15 years, 49·2% for 2014 and 86·6% for 2017; 15 to 19 years, 52·4% for 2014 and 86·2% for 2017); median time to ART initiation went from 2–3 months to same-day initiation during this same time period. Rates of retention on ART 6 months after linkage saw much smaller improvements over time (<2 years, 35·4% for 2014 and 52·0% for 2017; 2 to <5 years, 40·2% for 2014 and 54·4% for 2017; 5 to <15 years, 46·7% for 2014 and 63·4% for 2017; 15 to 19 years, 40·1% for 2014 and 52·7% for 2017). Interpretation: Improvements in ART initiation occurred largely in parallel across age groups over time, despite universal treatment being implemented at different timepoints for different ages. Although the rates of ART initiation reach high levels, retention on ART was low. This analysis provides a comprehensive examination of how paediatric and adolescent outcomes have evolved over the past decade in Zambia and identifies where more targeted efforts will be needed over the next decade. Funding: National Institutes of Health.