AimThe study aimed to explore the relationship of anthocyanin and its subtypes with myopia in adolescents aged 12–17 years.MethodsAdolescents data for this cross-sectional study were extracted from the National Health and Nutrition Examination Survey (NHANES) 2007–2008. Anthocyanin and subtypes were obtained using the Nutrient Database for Dietary Studies codes. Myopia was defined as a spherical equivalent of −1.0 diopters or less. The relationships between anthocyanin and subtypes intake and myopia were determined utilizing weighted univariate and multivariate logistic regression models. The relationships were also explored in gender, leisure time, physical activity, sedentary activity, BMI, and serum cotinine subgroups.ResultsA total of 839 adolescents were included for further analysis, among them 245 have myopia. Malvidin (34.98%) was the subtype with the largest anthocyanin intake, followed by cyanidin (22.94%). Compared to adolescents without anthocyanin intake, total anthocyanin intake was related to a lower incidence of myopia (OR = 0.69, 95%CI: 0.51–0.92). Higher intake of cyanidin (OR = 0.69, 95%CI: 0.52–0.92), petunidin (OR = 0.64, 95%CI: 0.42–0.97), and delphinidin (OR = 0.71, 95%CI: 0.51–0.99) were associated with lower odds of myopia in adolescents. Higher total anthocyanin intake was related to lower odds of myopia in those females, leisure time physical activity ≥60 min/day, sedentary time <8 h/day, overweight or obese, and serum cotinine ≥0.05 ng/ml.ConclusionHigher total anthocyanin intake, particularly cyanidin, petunidin, and delphinidin, was related to a lower incidence of myopia in adolescents. Increasing dietary anthocyanin intake may be an effective prevention strategy for ocular health.