Dietary factors play a role in modulating chronic inflammation and in the development of CVD. We aimed to investigate the association between the dietary inflammatory index (DII) and cardiometabolic risk factors among adolescents. A total of 31 684 Brazilian adolescents (aged 12–17 years) from the Study of Cardiovascular Risks in Adolescents (ERICA) were included. Dietary intake was assessed using a 24-h dietary recall. The energy-adjusted dietary inflammatory index (E-DII) score was calculated based on data for twenty-five available nutrients. The anthropometric profile, blood pressure, lipid profile, glucose, Homeostatic Model Assessment for Insulin Resistance (HOMA-IR) and glycated Hb were measured. Poisson regression models were used to examine the associations between sex-specific quartiles of the E-DII and cardiometabolic risk factors. In the energy-adjusted models, when comparing a high pro-inflammatory diet (quartile 4) with an anti-inflammatory diet (quartile 1), there was a positive association with high HOMA-IR among boys (prevalence ratios (PR)Q4 = 1·37, 95 % CI: 1·04, 1·79); and with high fasting glucose (PRQ4 = 1·96, 95 % CI: 1·02, 3·78), high TAG (PRQ4 = 1·92, 95 % CI: 1·06, 3·46), low HDL-cholesterol (PRQ4 = 1·16, 95 % CI: 1·02, 1·32) and high LDL-cholesterol (PRQ4 = 1·93, 95 % CI: 1·12, 3·33) among girls. Additionally, a moderately pro-inflammatory diet was positively associated with high HOMA-IR (PRQ2 = 1·14, 95 % CI: 1·02, 1·29) among girls and high total cholesterol (PRQ3 = 1·56, 95 % CI: 1·20, 2·01) among boys. In conclusion, this study provides new evidence on the association between inflammatory diets with cardiometabolic risk factors among adolescents.