Epidemiological evidence on the association between long-term air pollution exposure and the incidence of autoimmune thyroid diseases (AITD) in children and adolescents remains limited. This study aimed to examine the relationship between long-term exposure to air pollution and the onset of AITD in children and adolescents in South Korea. This nationwide cohort study included 1,400,433 children aged 6 years at baseline (2008-2010) from the National Health Information Database, with follow-up until 19 years of age. The onset of AITD was defined based on the 10th revision of the International Classification of Diseases (Hashimoto's thyroiditis: E063; Graves' disease: E050). Individuals with missing data on age, residence, income level, or underlying conditions such as congenital hypothyroidism were excluded. Exposure concentrations of particulate matter (PM10 and PM2.5), nitrogen dioxide (NO2), sulfur dioxide (SO2), and ozone (O3) were categorized into quartiles. Hazard ratios (HRs) with 95 % confidence intervals (CIs) were estimated using Cox proportional hazards models, comparing the lowest quartile with higher quartiles. Among the 1,400,433 children analyzed (boys: 729,367; girls: 671,066), 2344 cases (0.17 %) of Hashimoto's thyroiditis and 3424 cases (0.24 %) of Graves' disease were identified during follow-up. The total person-years for both diseases were approximately 19.6 million. Among girls, annual mean PM2.5 exposure (HR3rd quartile: 1.245, 95 % CI: 1.035-1.497; HR4th quartile: 1.286, 95 % CI: 1.052-1.571) was significantly associated with the onset of Graves' disease, as was SO2 exposure (HR2nd quartile: 1.131, 95 % CI: 1.003-1.277). Among boys, a significant association was observed between higher annual NO2 exposure (HR4th quartile: 2.153, 95 % CI: 1.214-3.818) and the onset of Hashimoto's thyroiditis. These findings provide evidence that long-term exposure to air pollution, particularly PM2.5, NO2, and SO2, is associated with the incidence of AITD in children and adolescents.