Life's Essential 8 (LE8) is prompted by the American Heart Association (AHA) to assess cardiovascular health. The association between LE8 and cognitive function in America is unknown. Our study was to investigate the association of LE8 with cognitive function in general adults. A total of 2,301 participants were enrolled in the National Health and Nutrition Examination Surveys (NHANES). LE8 scores (range 0-100) were obtained from measurements based on American Heart Association definitions, divided into health behavior and health factor scores. Cognitive function was assessed by three tests including the Consortium to Establish a Registry for Alzheimer's Disease (CERAD), Animal fluency test (AFT), and Digit Symbol Substitution test (DSST). The multivariable linear regression analysis explored the associations between LE8 and cognitive function. Smooth curve fitting was explored using restricted cubic splines. The inflection point was determined by the two-piecewise linear regression. In the multivariable linear regression model with full adjustment for confounding variables, AFT scores were 1.2 points higher in participants with LE8 scores >80 than in those with LE8 scores <50 (high LE8 score group: β = 1.20, 95% CI 0.37, 2.03), and 3.32 points higher in DSST (high LE8 score group: β = 3.32, 95% CI 1.24, 5.39). Although high LE8 scores show a Negative association with high CERAD, we found a significant association between higher LE8 scores and higher CERAD when LE8 scores were higher than 82.5 (β = 0.21 95%CI 0.04, 0.39, p-value = 0.0179). Our study highlighted a positive association between Life's Essential 8 and cognitive function in older adults.