AimCognitive decline is more prevalent in elderly persons with periodontitis. Greater adherence to Healthy Eating Index (HEI)-2015 has been reported to improve cognitive function in the elderly population. However, whether the benefits of HEI-2015 on cognitive function apply to elderly patients with periodontitis remains unknown. MethodsThis is a cross-sectional study based on the National Health and Nutrition Examination Survey (NHANES). The data were extracted from database 2011–2014. Cognitive function was measured through the Consortium to Establish a Registry for Alzheimer's Disease battery for immediate recall (CERAD-WL) and delayed recall (CERAD-DR), Animal Fluency Test (AFT), and Digit Symbol Substitution Test (DSST). The data of HEI-2015 were acquired from 24-hour dietary recalls. Weighted linear regression models were performed to investigate the association between HEI-2015 and cognitive function in elderly patients with periodontitis. The associations were further investigated in subgroups of sex, cardiovascular disease status, and depression status. ResultsA total of 1862 participants were included, and 1223 of them had periodontitis. Periodontitis was negatively associated with cognitive function (β = −0.45; 95% confidence interval [CI], −0.87 to −0.03). No statistically significant relationship was observed between HEI-2015 and cognitive function (β = 0.33; 95% CI, −0.02 to 0.69). Low HEI-2015 score was associated with high odds of cognitive decline in patients with periodontitis (β = −0.73; 95% CI, −1.25 to −0.21; P for trend = .01). Higher HEI-2015 was related to the lower incidence of cognitive function decline in patients with periodontitis who were female (β = −0.53; 95% CI, −1.03 to −0.03), had a socioeconomic status from 0 to 3 (β = −0.55; 95% CI, −1.00 to −0.09), did not have cardiovascular disease (β = −0.60; 95% CI, −1.14 to −0.05), and did not have depression (β = −0.57; 95% CI, −1.11 to −0.03). ConclusionsGreater HEI-2015 adherence may improve cognitive function amongst elderly patients with periodontitis. Further studies were needed to investigate this association in elderly persons with periodontitis.