Educational inequalities are a major contributor to health and social inequalities. We investigated the effects of adverse birth characteristics and social disadvantage upon educational outcomes over the lifecourse and across generations. Our subjects were 12 674 Swedish infants born 1915–1929 and 9706 of their grandchildren born 1973–1980. Within both cohorts, better school achievement (schoolmarks in elementary school) was predicted by: heavier birthweight, lower birth order, older mother, married mother and higher family social class. These effects persisted after mutual-adjustment, and birth characteristics and family composition played little role in explaining social class effects. There were no independent effects of preterm or twin status, but weak evidence that postterm infants were disadvantaged. The predictors of education continuation (secondary school attendance and entrance to tertiary education) were very similar, with family composition and social class effects persisting even after adjusting for school achievement. Across generations, better grandchild educational outcomes were predicted by heavier birthweight, lower birth order and higher social class in the grandparents. These associations became non-significant and/or substantially attenuated after adjusting for grandchild socio-economic position in childhood, suggesting this was the major mechanism for this effect. We conclude that multiple early-life characteristics predict educational outcomes across the lifecourse and across generations, including birth outcome and family composition effects which typically receive little attention. Most effects were remarkably stable, suggesting their relevance for understanding educational inequalities in other populations. Such understanding would, in turn, clarify a major mechanism whereby health inequalities emerge across the lifecourse and are recreated across generations.