BackgroundDiet quality plays an important role in the development of age-related chronic diseases. However, the association between dietary quality assessed by Healthy Eating Index (HEI)-2015 and cognitive function among the United States (US) elderly adults remains unclear. The present study aims to explore the association between HEI-2015 and cognitive function in elderly adults using data from National Health and Nutrition Examination Survey (NHANES) 2011-2012. MethodsHEI-2015 scores were calculated from two days 24-hour recall interviews. The cognitive function was evaluated by Digit Symbol Substitution Test (DSST), Animal Fluency Test (AFT) and a global cognition level derived by summing the z scores of individual tests. The associations between HEI-2015 and cognitive function were explored using multiple linear regression and binary logistic regression models. ResultsA total of 1278 participants aged 60 years or older were included. Compared to the lowest HEI-2015 tertile, the elderly adults in highest tertile had a higher global cognition, DSST and AFT scores (P<0.05); with the lowest quartile of global cognition as cognitive impairment, those who were in the highest HEI-2015 tertile had 38% lower odds of cognitive impairment (OR: 0.62; 95%CI: 0.42-0.91). Among HEI-2015 components, the elderly adults adhering to recommended intake of whole grains and whole fruits components were more likely to have better performance on global cognition (P<0.05). ConclusionThe higher HEI-2015 was positively associated the better cognitive performance on the global cognition, DSST, and AFT in the US elderly adults.