Evidence for an association of leukocyte telomere length (LTL) with cognitive function, predominantly in older adults, is inconsistent. No report has examined the association of LTL dynamics (age-specific LTL and its attrition rate) with cognitive function. We aimed to examine the association of LTL dynamics over 13 years in young adulthood with cognitive function in midlife. 497 individuals who had LTL measured at ages 28-32 and 41-46 years were assessed at ages 48-52 for global cognitive function and its five specific component domains with a NeuroTrax computerized test battery. Multivariable regression and logistic models were applied for cognition treated as a continuous and categorical variable, respectively. We found that LTL attrition (adjusted for sex, baseline LTL and potential confounders including socioeconomic variables) was inversely associated with global cognition (standardized β = -.119, p = .004) and its component domains: information processing speed (β = -.102, p = .024), visual-spatial function (β = -.102, p = .017) and memory (β = -.093, p = .045), but less so for the attention and executive domains. The multivariable-adjusted odds ratio for low global cognition comparing the upper versus lower thirds of LTL attrition was 2.12 (95 % CI 1.11-4.08, p for trend = .023). There was no association of baseline or follow-up LTL with cognition. No effect modification was evident for sex, smoking or inflammatory markers. In conclusion, faster LTL attrition in young adulthood was associated with poorer global and domain-specific cognitive function in midlife, suggesting that more rapid LTL attrition may be predictive of cognitive aging in healthy young adults.