Diet may be a modifiable factor in the prevention of psychiatric disorders by modulating inflammation. In this study, we evaluated the association between empirical dietary inflammatory index (EDII) that is designed to evaluate the inflammatory potential of diets and anxiety disorders (AD) in adults. This case–control study was carried out on 85 patients who were group matched by gender with 170 healthy subjects. Data for dietary intake were assessed by using a 147‐item validated food frequency questionnaire (FFQ). Anthropometric measures were collected using standard methods. EDII score was developed according to participants' dietary intakes of 28 predefined food groups. Multivariate odds ratios (OR) with 95% confidence intervals (CI) were used to investigate the association of empirically derived inflammatory potential of the diet and anxiety disorder. We observed that after adjusting for confounders, individuals in the top category of EDII score were 2.09 fold more likely to have anxiety disorder compared with those in the bottom category (OR: 2.09, 95% CI: 1.01, 4.33). Also, higher EDII contributed to a higher GAD‐7 score (p < .001). There was a significant positive linear association between EDII and AD (β = 3.64, p < .001). After controlling for potential confounders AD had a strong positive correlation with the EDII score (r = .61, p‐value <.001). In conclusion, in this case–control study, we realized that there is a positive association between the EDII score, odds, and severity of anxiety disorder. Ultimately, the potential role necessitates clarifying this association by conducting large‐population prospective cohort studies.