BackgroundPoor academic performance in childhood is associated with suicide attempt in adulthood, but the mechanisms are not known. We investigated educational attainment as a possible pathway.MethodsWe followed two sets of cohorts, born around 1950/1970, respectively, in the Swedish population-representative ‘Evaluation Through Follow-up’ study for a first suicide attempt in national records up to 2013. Data on grade point average (GPA) at age 13/16 and educational attainment (years of schooling) in adulthood were used. The path models included linear and Cox proportional hazards regressions. A model with matched age range during follow-up was used to compare the cohorts.ResultsIn the 1970 cohort, the association between GPA and suicide attempt between age 26 and 46 was partly mediated by attained education (total association, β=−0.82; via education: −0.29, per SD increase in GPA), but GPA also had a direct path to suicide attempt (β=−0.53). There was no evidence of such a pathway in the 1950 cohort between age 41 and 65. In the age-matched analysis, at age 26–46, the association between GPA and suicide attempt was stronger in the 1970 cohort compared to the 1950 cohort (β=−0.72 and −0.24, respectively).ConclusionsDifferences in attained education seem to partly explain the associations of academic performance with suicide attempt up to middle age. Furthermore, there is some indication that academic performance may have become more important for young people’s mental health than it was in previous generations.