摘要:This study aimed to investigate the association between the alternative healthy eating index-2010 (AHEI-2010) with cognitive function and the mediating role of depressive symptoms in older adults using the data from the 2011–2014 National Health and Nutrition Examination Survey (NHANES). The AHEI-2010 was calculated from NHANES individual food data and Food Patterns Equivalents Database (FPED) diet data. Cognitive function was assessed by the Consortium to Establish a Registry for Alzheimer’s disease (CERAD, memory function indicator), Word Learning sub-test, digital symbol substitution test (DSST, processing speed indicator), animal fluency test (AFT, executive function indicator), and the comprehensive z-score (global cognition indicator). A weighted multiple linear regression model was used to explore the relationship between AHEI-2010 and cognitive function, and Karlson–Holm–Breen (KHB) method was used to explore the mediating effect of depressive symptoms. A total of 2644 participants were included in this study. Participants with higher AHEI-2010 scores were more likely to have higher scores in DSST, AFT, and comprehensive z-score compared with the lowest quartile. Depressive symptoms play a significant mediating role between AHEI-2010 and cognitive function. The proportion of mediating in CERAD, DSST, AFT, and comprehensive z-score was 14.14%, 9.10%, 9.15%, and 10.47%, respectively. This study found that higher dietary quality was associated with better cognitive function. In addition, depressive symptoms may be an important pathway linking diet and cognitive function.