ABSTRACT Aims In this study, we aimed to evaluate the relationship between the dietary inflammatory index (DII) and mental health outcomes among patients with migraine headaches. Methods In this cross-sectional study, 262 subjects were included. The dietary intakes were collected using a validated 168-item semi-quantitative food frequency questionnaire. Items were scored according to their inflammatory potential, so a higher DII indicated a more pro-inflammatory diet. The association between DII and the mental health of participants was investigated using multinomial logistic regression and odds ratio (OR) with a corresponding 95% confidence interval (CI) was reported. Results Overall, 224 women and 38 men, with a mean (standard error) DII of −2.96 (0.06), age of 36.1 (0.53) years, and BMI of 25.55 (0.21) kg/m2, comprised our study population. DII was positively associated with a higher risk of depression in patients with the highest adherence to a pro-inflammatory diet compared to those with the lowest adherence (OR = 1.76; 95%CI: 1.04, 3.00; Ptrend = 0.035). Adjustments for age, sex, marital status, smoking status, migraine headache index score, number of family members, mean arterial pressure, medication, physical activity, and BMI intensified the association in a way that the risk of depression was 2.03 times higher in patients with the highest adherence to a pro-inflammatory diet compared to those with the lowest adherence to a pro-inflammatory diet (OR = 2.03; 95%CI: 1.18, 3.49; Ptrend = 0.011). Conclusion Our findings suggest that depression was positively associated with adherence to a pro-inflammatory diet. However, no significant association was observed between anxiety and stress with DII.