Social causation and health-related selection may contribute to educational differences in adolescents' attention problems and externalizing behaviour. The social causation hypothesis posits that the social environment influences adolescents' mental health. Conversely, the health-related selection hypothesis proposes that poor mental health predicts lower educational attainment. From past studies it is unclear which of these mechanisms predominates, as attention problems and externalizing behaviour have the potential to interfere with educational attainment, but may also be affected by differences in the educational context. Furthermore, educational gradients in mental health may reflect the impact of 'third variables' already present in childhood, such as parental socioeconomic status (SES), and IQ. We investigated both hypotheses in relation to educational differences in externalizing behaviour and attention problems throughout adolescence and young adulthood. We used data from a Dutch cohort (TRAILS Study; n = 2229), including five measurements of educational level, externalizing behaviour, and attention problems from around age 14-26 years. First, we evaluated the directionality in longitudinal associations between education, externalizing behaviour, and attention problems with and without adjusting for individual differences using fixed effects. Second, we assessed the role of IQ and parental SES in relation to attention problems, externalizing behaviour, and educational level. Attention problems predicted decreases in education throughout all of adolescence and young adulthood. Differences in parental SES contributed to increases in externalizing behaviour amongst the lower educational tracks in mid-adolescence. Childhood IQ and parental SES strongly predicted education around age 14. Parental SES, but not IQ, also predicted early adolescent attention problems and externalizing behaviour. Our results provide support for the health-related selection hypothesis in relation to attention problems and educational attainment. Further, our results highlight the role of social causation from parental SES in determining adolescent educational level, attention problems, and externalizing behaviour.