BackgroundThe relationship between diet and psychological disorders in older adults has attracted considerable attention as the global trend of aging. This study examines the relationship between Dietary inflammatory index (DII) and the risk of depression and suicide in older adults using the National Health and Nutrition Examination Survey (NHANES) as a large cross-sectional study.MethodsThe data were extracted from NHANES from 2005 to 2018, and cross-sectional studies were conducted on older adults (age ≥ 60 years). According to their median DII, participants were classified into High-DII (DII ≥ 1.23) and Low-DII (DII < 1.23) groups. Depression was the primary outcome, and suicidal ideation was a secondary outcome. Utilizing multi-factor logistic regression to correlate DII with outcomes.ResultsThere were 10,956 elderly participants included in the analysis. In comparison to Low-DII group, High-DII group exhibited a higher rate of depression (8.9% vs. 6.7%; P < 0.001) and higher ideation to commit suicide (3.7% vs. 3.0%; P = 0.039). Moreover, in terms of gender ratio, men accounted for 44% of the High-DII group, which was significantly lower than 56.2% of the Low-DII group (P < 0.001). Furthermore, logistic regression revealed that High-DII group had a higher risk of depression in the previous 2 weeks (OR = 1.358, 95% CI: 1.180–1.564; P < 0.001) and a higher risk of suicidal ideation (OR = 1.244, 95% CI: 1.010–1.532; P = 0.040). Additionally, after adjusting for demographic covariates such as age, gender and race, High-DII group still had a higher risk of depression (OR = 1.293, 95% CI: 1.121–1.493; P < 0.001) and suicidal ideation (OR = 1.261, 95% CI: 1.021–1.55; P = 0.031). Furthermore, after adjusting for various covariates like demographic, social factors, and comorbidities, the High-DII group remained at higher risk for depression (OR = 1.178, 95% CI: 1.019–1.363; P = 0.027), and the risk of comorbid suicidal ideation remained high (OR = 1.136, 95% CI: 0.917–1.408), but the difference was not significant (P = 0.243).ConclusionIn older adults, high levels of DII are associated with depression and suicidal ideation. Multiple factors affect the mental health of older adults, and it is unknown to what extent a pro-inflammatory diet contributes to depression and suicidal thoughts in older adults. Nonetheless, daily dietary management in older adults should be emphasized.