Background. Although prior studies have examined the associations between neighborhood characteristics and cognitive health, little is known about whether local food environments, which are critical for individuals’ daily living, are associated with late-life cognition. Further, little is known about how local environments may shape individuals’ health-related behaviors and impact cognitive health. The aim of this study is to examine whether objective and subjective measures of healthy food availability are associated with ambulatory cognitive performance and whether behavioral and cardiovascular factors mediate these associations among urban older adults.Methods. The sample consisted of systematically recruited, community-dwelling older adults (N = 315, mean age = 77.5, range = 70–91) from the Einstein Aging Study. Objective availability of healthy foods was defined as density of healthy food stores. Subjective availability of healthy foods and fruit/vegetable consumption were assessed using self-reported questionnaires. Cognitive performance was assessed using smartphone-administered cognitive tasks that measured processing speed, short-term memory binding, and spatial working memory performance 6 times a day for 14 days.Results. Results from multilevel models showed that subjective availability of healthy foods, but not objective food environments, was associated with better processing speed (estimate= -0.176, p = .003) and more accurate memory binding performance (estimate = 0.042, p = .012). Further, 14~16% of the effects of subjective availability of healthy foods on cognition were mediated through fruit and vegetable consumption.Conclusions. Local food environments seem to be important for individuals’ dietary behavior and cognitive health. Specifically, subjective measures of food environments may better reflect individuals’ experiences regarding their local food environments not captured by objective measures. Future policy and intervention strategies will need to include both objective and subjective food environment measures in identifying impactful target for intervention and evaluating effectiveness of policy changes.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12877-023-04003-z.