BackgroundTo scrutinize the relationship between vitamin B2 consumption and cognitive function based on the NHANES database.MethodsThis cross-sectional study included eligible older adults from the NHANES 2011–2014. Vitamin B2 intake was determined from dietary interview data for two 24-h periods. Cognitive function was evaluated through the Consortium to Establish a Registry for Alzheimer’s Disease (CERAD), Animal Fluency Test (AFT), and Digit Symbol Substitution Test (DSST). The regression analyses were used to evaluate the association of vitamin B2 intake with cognitive performance. Stratified analyses based on gender, race, and body mass index (BMI) were conducted.ResultsHigher vitamin B2 intake was correlated with higher scores on each test. As compared to the lowest quartile, the highest quartile of vitamin B2 intake was related to a 45.1-fold increase (P = 0.004) on the DSST test sores. Moreover, those who were males, non-Hispanic whites, or had a BMI of 18.5 to 30 kg/m2 had a stronger relationship between total vitamin B2 consumption and cognitive function.ConclusionIt's possible that older persons who consume more vitamin B2 have enhanced performance in some areas of cognitive function. To determine the causal link between vitamin B2 consumption and cognitive performance, further long-term research is required.