Emerging evidence has suggested that mushrooms, which are a rich source of the potent antioxidants ergothioneine and glutathione as well as vitamin D, may have neuroprotective properties. This study investigated the association between mushroom consumption and cognitive performance in a nationally representative sample of US older adults. We analysed data from older adults aged ≥ 60 years from the 2011–2014 National Health and Nutrition Examination Survey. Mushroom intake was measured using up to two 24-h dietary recalls and was categorised into three groups (lowest, middle and highest). Cognitive function tests included the Animal Fluency (AF) Test; Consortium to Establish a Registry for Alzheimer’s Disease Delayed Recall (CERAD-DR) and Word Learning (CERAD-WL); and Digit Symbol Substitution Test (DSST). Multivariable linear regression models were developed, adjusting for socio-demographics, major lifestyle factors, self-reported chronic diseases and dietary factors, including the Healthy Eating Index-2015 score and total energy. The study included 2840 participants. Compared with the lowest category of mushroom intake, participants in the highest category (median intake = 13·4 g /4184 KJ (1000 kcal)/d) had higher scores for DSST (β = 3·87; 95 % CI 0·30, 7·45; P for trend = 0·03) and CERAD-WL (β = 1·05; 95 % CI 0·0003, 2·10; P for trend = 0·04). Similar non-significant trends were observed for AF (β = 0·24; 95 % CI −2·26, 2·73; P for trend = 0·92) but not for the CERAD-DR. Greater mushroom intake was associated with certain cognitive performance tests, suggesting regular mushroom consumption may reduce the risk of cognitive decline.