BackgroundElucidating risk pathways for under‐achieving at school can inform strategies to reduce the number of adolescents leaving school without passing grades in core subjects. Maternal depression can compromise the quality of parental care and is associated with multiple negative child outcomes. However, only a few small studies have investigated the association between perinatal maternal depression and poor academic achievement in adolescence. The pathways to explain the risks are also unclear.MethodProspective observational data from 5,801 parents and adolescents taking part in a large UK population cohort (Avon‐Longitudinal‐Study‐of‐Parents‐and‐Children) were used to test associations between maternal and paternal depression and anxiety in the perinatal period, executive function (EF) at age 8, and academic achievement at the end of compulsory school at age 16.ResultsAdolescents of postnatally depressed mothers were 1.5 times (1.19, 1.94, p = .001) as likely as adolescents of nondepressed mothers to fail to achieve a ‘pass’ grade in math; antenatal anxiety was also an independent predictor of poor math. Disruption in different components of EF explained small but significant proportions of these associations: attentional control explained 16% (4%, 27%, p < .001) of the association with postnatal depression, and working memory explained 17% (13%, 30%, p = .003) of the association with antenatal anxiety. A similar pattern was seen for language grades, but associations were confounded by maternal education. There was no evidence that paternal factors were independently associated with impaired child EF or adolescent exams.ConclusionMaternal postnatal depression and antenatal anxiety are risk factors for adolescents underachieving in math. Preventing, identifying, and treating maternal mental health in the perinatal period could, therefore, potentially increase adolescents’ academic achievement. Different aspects of EF partially mediated these associations. Further work is needed, but if these pathways are causal, improving EF could reduce underachievement in math.