To determine whether intraindividual variability in fasting glucose (FG) below the threshold of diabetes is associated with cognitive function in middle adulthood beyond increasing FG. We studied 3,307 CARDIA (Coronary Artery Risk Development Study in Young Adults) participants (age range 18-30 years; 1985-1986) at baseline and calculated two measures of long-term glucose variability: the coefficient of variation about the mean FG (CV-FG) and the absolute difference between successive FG measurements [average real variability (ARV-FG)] before the onset of diabetes over 25 and 30 years of follow-up. Cognitive function was assessed at years 25 (2010-2011) and 30 (2015-2016) with the Digit Symbol Substitution Test (DSST), Rey-Auditory Verbal Learning Test (RAVLT), Stroop Test, Montreal Cognitive Assessment, and category and letter fluency tests. We estimated the association between glucose variability and cognitive function test score with adjustment for clinical and behavioral risk factors, mean FG level, change in FGlevel, and diabetes development, medication use, and duration. After multivariable adjustment, 1-SD increment of CV-FG was associated with worse cognitive scores at year 25: DSST, standardized regression coefficient, -0.95 (95% CI -1.54, -0.36); RAVLT, -0.14 (95% CI -0.27, -0.02); and Stroop Test, 0.49 (95% CI 0.04, 0.94). Findings were similar between CV-FG with each cognitive test score at year 30 and when we used an alternative measure of variability (ARV-FG) that captures variability in successive FG values. Higher intraindividual FG variability during young adulthood below the threshold of diabetes was associated with worse processing speed, memory, and language fluency in midlife independent of FG levels.