Aim: To investigate the cognitive function in people without diabetes, with prediabetes and with diabetes. Methods/Design: The study design used was a cross-sectional analysis of data in people above 60 years registered in NHANES from 2011 to 2014.Three assessments were used to characterize cognitive function: (a) CERAD Word Learning subtest assessing immediate and delayed learning ability, (b) The Animal Fluency test assesing categorical verbal fluency, and (c) The Digit Symbol Substitution test assessing processing speed, sustained attention, and working memory. Results: (A) Memory recall (−0.19, [−0.34; −0.039], p = 0.014) and Delayed memory recall decline was associated with diabetes (−0.285, [−0.503; −0.067], p = 0.01), but not in an adjusted analysis. (B) Animal Fluency score decline was associated with diabetes (−1.185, [−1.688; −0.682], p < 0.001). (C) Digit Symbol score decline was associated with diabetes (−6.897, [−8.491; −5.302], p < 0.001). Prediabetes was not associated with cognitive function. Conclusions: This study demonstrates an association between cognitive dysfunction and diabetes. Results may also indicate that cognitive decline is not yet present in people with mild impairments of glucose homeostasis.