Background: Childhood maltreatment is a leading environmental risk factor for an unfavourable course of disease in major depressive disorder. Both maltreatment and major depressive disorder are associated with similar brain structural alterations suggesting that brain structural changes could mediate the adverse influence of maltreatment on clinical outcome in major depressive disorder. However, longitudinal studies have not been able to confirm this hypothesis. We therefore aimed to clarify the relationship between childhood trauma, brain structural alterations, and depression relapse in a longitudinal design. Methods: We recruited participants at the Department of Psychiatry, University of Münster, Germany, from the Münster Neuroimage Cohort for whom 2-year longitudinal clinical data were available. Baseline data acquisition comprised clinical assessments, structural MRI, and retrospective assessment of the extent of childhood maltreatment experiences using the Childhood Trauma Questionnaire. Clinical follow-up assessments were conducted in all participants 2 years after initial recruitment. Findings: Initial recruitment was March 21, 2010–Jan 29, 2016; follow-up reassessment Sept 7, 2012–March 9, 2018. 110 patients with major depressive disorder participated in this study. 35 patients were relapse-free, whereas 75 patients had experienced depression relapse within the 2-year follow-up period. Childhood maltreatment was significantly associated with depression relapse during follow-up (odds ratio [OR] 1˙035, 95% CI 1˙001–1˙070; p=0˙045). Both previous childhood maltreatment experiences and future depression relapse were associated with reduced cortical surface area (OR 0˙996, 95% CI 0˙994–0˙999; p=0˙001), primarily in the right insula at baseline (r=−0˙219, p=0˙023). Insular surface area was shown to mediate the association between maltreatment and future depression relapse (indirect effect: coefficient 0˙0128, SE 0˙0081, 95% CI 0˙0024–0˙0333). Interpretation: Early life stress has a detrimental effect on brain structure, which increases the risk of unfavourable disease courses in major depression. Clinical and translational research should explore the role of childhood maltreatment as causing a potential clinically and biologically distinct subtype of major depressive disorder. Funding: The German Research Foundation, the Interdisciplinary Centre for Clinical Research, and the Deanery of the Medical Faculty of the University of Münster.