SummaryBackground: Early-life adversity is associated with adverse mental health outcomes and poorer cognitive functioning in later development. However, little is known about how early-life adversity, mental health and cognition affect one another or how the effects unfold over time. In a unique longitudinal sample, we use a path model approach to study whether poorer mental health in childhood may mediate the effects of early-life adversity on later cognitive outcomes.Methods: We used 5-wave longitudinal data from the Millennium Cohort Study, a British population study that prospectively sampled children born between September 1, 2000 and January 11, 2002. We used data collected when the children were aged 3, 5, 7, 11 and 14. Information on exposure to adverse childhood experiences and mental health were provided by parents, while the children completed two cognitive tasks and additional mental health questionnaires at ages 11 and 14. A global adversity score was extracted from multiple adverse childhood experiences collected in the study using Principal Component Analysis. Total errors in a working memory task and total correct number of words in a vocabulary task were the principal cognitive outcomes. Total scores on the Strengths and Difficulties Questionnaire were modeled as mediators.Findings: The sample consisted of 13,287 children (Male = 6,712, Female = 6,575) who completed the working memory task at age 11 and 11,726 children (Male = 5,884, Female = 5,842) who completed a vocabulary task at age 14. We found a significant total association between global adversity and poorer performance on working memory (β = 0.116, p < 0.001 [95%CI 0.098, 0.134]) and vocabulary scores (β = -0.112, p < 0.001, [95% CI-0.130, -0.094]) tasks. Notably, current and previous mental health mediated a substantial proportion (working memory: 59%; vocabulary: ¬65%), of these effects. Our analysis showed that adversity has an enduring adverse effect on mental health, and that poorer mental health is associated with poorer cognitive performance later on in development. Moreover, the adverse effects of mental health were cumulative: poor mental health early on is associated with poorer cognitive scores up to 11 years later, above and beyond contemporaneous mental health.Interpretations: Children who experience early-life adversity are more likely to suffer from poorer mental health, which in turn is associated with poorer cognitive performance in adolescence. Our findings highlight at least one potential mechanism through which early-life adversity leads to poorer cognitive outcomes: Prolonged periods of poor mental health may have lasting, partially cumulative effects on working memory and vocabulary. These findings have important potential clinical and educational implications, because they suggest that academic and cognitive resilience may be supported through early mental health interventions in vulnerable children. Funding: TN is supported by the Cambridge Trust (University of Cambridge). ALVH is supported by Royal Society, and the Social Safety and Resilience programme at Leiden University. RAK was supported by Rogier A. Kievit, Medical Research Council (http://dx.doi.org/10.13039/501100000265), Award ID: SUAG/047 G101400 and a Hypatia Fellowship (Radboud University).