We study effects of retirement on cognitive abilities (up to ten years after retirement) using data from 21 countries in Continental Europe, England, and the US, and exploiting early-retirement thresholds for identification. For this purpose, combines event-study estimations with the marginal treatment effect framework to allow for effect heterogeneity. This helps to decompose event-study estimates into true medium-run effects of retirement and effects driven by differential retirement preferences. Our results suggest considerable negative effects of retirement on cognitive abilities. We also detect substantial effect heterogeneity: Those who retire as early as possible are not affected while those who retire later exhibit negative effects.