BackgroundInflammation is a key factor in the development of asthma, and diet significantly influences inflammatory responses. This study examines the relationship between the Dietary Inflammatory Index (DII) and asthma prevalence.MethodsWe conducted a cross-sectional analysis using data from the National Health and Nutrition Examination Survey (NHANES) from 1999 to 2018. Demographic details, anthropometric measurements, dietary habits, lifestyle factors, and asthma status were recorded for all participants. Multivariable logistic regression was utilized to assess the relationship between DII and asthma prevalence. Additionally, restricted cubic spline (RCS) analysis was employed to explore the nonlinearity and dose–response relationship between DII and asthma risk. Subgroup analyses were stratified by gender, age, race, body mass index (BMI), poverty income ratio (PIR), education, smoking status, alcohol use, and family medical history to dissect the association between DII and asthma across diverse populations.ResultsThe analysis included 37,283 adults from NHANES. After adjusting for potential confounders in the multivariable logistic regression model, a significant positive association was identified between DII and asthma (OR, 95% CI: 1.05, 1.02–1.09, per 1 SD increase). The RCS analysis revealed a nonlinear association (p for nonlinearity = 0.0026), with an inflection point at 1.366, beyond which an increase in DII was significantly associated with asthma risk. Furthermore, the stratified analyses indicated a positive association between DII and asthma in the majority of subgroups.ConclusionThe findings underscore a significant and nonlinear association between DII and asthma. To enhance asthma prevention and management, greater emphasis should be placed on modulating dietary-induced inflammation.