We investigated the complex relations of socioeconomic status (SES) and healthy lifestyles with cognitive functions among older adults in 1313 participants, aged 60 years and older, from the National Health and Nutrition Examination Survey 2011–2014. Cognitive function was measured using an average of the standardized z-scores of the Consortium to Establish a Registry for Alzheimer’s Disease Word Learning and delayed recall tests, the Animal Fluency Test, and the Digit Symbol Substitution Test. Latent class analysis of family income, education, occupation, health insurance, and food security was used to define composite SES (low, medium, high). A healthy lifestyle score was calculated based on smoking, alcohol consumption, physical activity, and the Healthy-Eating-Index-2015. In survey-weighted multivariable linear regressions, participants with 3 or 4 healthy behaviors had 0.07 (95% CI 0.005, 0.14) standard deviation higher composite cognitive z-score, relative to those with one or no healthy behavior. Participants with high SES had 0.37 (95% CI 0.29, 0.46) standard deviation higher composite cognitive z-score than those with low SES. No statistically significant interaction was observed between healthy lifestyle score and SES. Our findings suggested that higher healthy lifestyle scores and higher SES were associated with better cognitive function among older adults in the United States.