BackgroundBoth nutrition and inflammation are associated with depression, but previous studies have focused on individual factors. Here, we assessed the association between composite indices of nutrition and inflammation and depression.MethodsAdult participants selected from the National Health and Nutrition Examination Survey (NHANES) between 2005 and 2018 were chosen. The exposure variable was the Advanced Lung Cancer Inflammation Index (ALI) integrating nutrition and inflammation, categorized into low, medium, and high groups. The outcome variable was depression assessed using the Patient Health Questionnaire-9 (PHQ-9). A multivariable logistic regression model was employed to evaluate the relationship between ALI and the risk of depression.ResultsAfter extensive adjustment for covariates, in the overall population, participants with moderate and high levels of ALI had a decreased prevalence of depression compared to those with low ALI levels, with reductions of 17% (OR, 0.83; 95% CI: 0.72–0.97) and 23% (OR, 0.77; 95% CI: 0.66–0.91), respectively. Among females, participants with moderate and high ALI levels had a decreased prevalence of depression by 27% (OR, 0.73; 95% CI: 0.60–0.88) and 21% (OR, 0.79; 95% CI: 0.64–0.98), respectively, compared to those with low ALI levels, whereas no significant association was observed among males. Subgroup analyses based on females and males yielded consistent results.ConclusionIn this study, we observed a negative correlation between moderate to high levels of ALI and the prevalence of depression, along with gender differences. Specifically, in females, greater attention should be given to the nutritional and inflammatory status.