Objective To determine whether premature menopause (≤40 years) can have long-lasting effects on later-life cognition and investigate whether this association varies depending on the type of menopause and use of hormone treatment (HT).Design Population-based cohort study.Setting The French Three-City Study.Population Four thousand eight hundred and sixty-eight women aged at least 65 years.Methods Multivariable-adjusted logistic regression models were used to determine the association between age at menopause, type of menopause (surgical, natural), and the use of menopausal HT and later-life cognitive function.Main outcome measures Performance on a cognitive test battery (at baseline and over 7 years) and clinical dementia diagnosis.Results Menopause at or before the age of 40 years, both premature bilateral ovariectomy and premature ovarian failure (non-surgical loss of ovarian function), was associated with worse verbal fluency (OR 1.56, 95%CI 1.12-1.87, P = 0.004) and visual memory (OR 1.39, 95%CI 1.09-1.77, P = 0.007) in later life. HT at the time of premature menopause appeared beneficial for later-life visual memory but increased the risk of poor verbal fluency. Type of menopause was not significantly associated with cognitive function. Premature menopause was associated with a 30% increased risk of decline in psychomotor speed and global cognitive function over 7 years.Conclusion Both premature surgical menopause and premature ovarian failure were associated with long-term negative effects on cognitive function, which are not entirely offset by menopausal HT. In terms of surgical menopause, these results suggest that the potential long-term effects on cognitive function should form part of the risk/benefit ratio when considering ovariectomy in younger women.