Most research on the strong relationship between education and cognitive aging has focused on years of schooling. Using data from the Wisconsin Longitudinal Study-a sample of White persons born in 1939-we explored whether greater curricular rigor in high school was also associated with better cognitive function in later life. We estimated multilevel structural equation models in data from 2,749 participants who attended 308 Wisconsin high schools, graduating in 1957. Independent of academic ability and performance and school-level financial and material resources, a more rigorous high school curriculum was associated with significantly better global cognitive functioning in 2020, when most participants were 81 years old. There was also a significant mediation via eventual degree attainment. The mediation was moderated such that men and participants from high socioeconomic status families benefited most from a rigorous curriculum. We discuss implications for modern educational policy.