Cognitive deficits are a key source of disability in individuals with major depressive disorder (MDD) and worsen with disease progression. Despite their clinical relevance, the underlying mechanisms of cognitive deficits remain poorly elucidated, hampering effective treatment strategies. Emerging evidence suggests that alterations in white matter microstructure might contribute to cognitive dysfunction in MDD. We aimed to investigate the complex association between changes in white matter integrity, cognitive decline, and disease course in MDD in a comprehensive longitudinal dataset. In the naturalistic, observational, prospective, case-control Marburg-Münster Affective Disorders Cohort Study, individuals aged 18-65 years and of Caucasian ancestry were recruited from local psychiatric hospitals in Münster and Marburg, Germany, and newspaper advertisements. Individuals diagnosed with MDD and individuals without any history of psychiatric disorder (ie, healthy controls) were included in this subsample analysis. Participants had diffusion-weighted imaging, a battery of neuropsychological tests, and detailed clinical data collected at baseline and at 2 years of follow-up. We used linear mixed-effect models to compare changes in cognitive performance and white matter integrity between participants with MDD and healthy controls. Diffusion-weighted imaging analyses were conducted using tract-based spatial statistics. To correct for multiple comparisons, threshold free cluster enhancement (TFCE) was used to correct α-values at the family-wise error rate (FWE; ptfce-FWE). Effect sizes were estimated by conditional, partial R2 values (sr2) following the Nakagawa and Schielzeth method to quantify explained variance. The association between changes in cognitive performance and changes in white matter integrity was analysed. Finally, we examined whether the depressive disease course between assessments predicted cognitive performance at follow-up and whether white matter integrity mediated this association. People with lived experience were not involved in the research and writing process. 881 participants were selected for our study, of whom 418 (47%) had MDD (mean age 36·8 years [SD 13·4], 274 [66%] were female, and 144 [34%] were male) and 463 (53%) were healthy controls (mean age 35·6 years [13·5], 295 [64%] were female, and 168 [36%] were male). Baseline assessments were done between Sept 11, 2014, and June 3, 2019, and after a mean follow-up of 2·20 years (SD 0·19), follow-up assessments were done between Oct 6, 2016, and May 31, 2021. Participants with MDD had lower cognitive performance than did healthy controls (p<0·0001, sr2=0·056), regardless of timepoint. Analyses of diffusion-weighted imaging indicated a significant diagnosis × time interaction with a steeper decline in white matter integrity of the superior longitudinal fasciculus over time in participants with MDD than in healthy controls (ptfce-FWE=0·026, sr2=0·002). Furthermore, cognitive decline was robustly associated with the decline in white matter integrity over time across both groups (ptfce-FWE<0·0001, sr2=0·004). In participants with MDD, changes in white matter integrity (p=0·0040, β=0·071) and adverse depressive disease course (p=0·0022, β=-0·073) independently predicted lower cognitive performance at follow-up. Alterations of white matter integrity occurred over time to a greater extent in participants with MDD than in healthy controls, and decline in white matter integrity was associated with a decline in cognitive performance across groups. Our findings emphasise the crucial role of white matter microstructure and disease progression in depression-related cognitive dysfunction, making both priority targets for future treatment development. German Research Foundation (DFG).