The relationship between adversity and cognition varies according to the specificity, number, duration, chronicity of the adversity, the life course period at which the adversity was experienced, and the cognitive domains investigated (Bick & Nelson, 2016; Künzi et al., 2022; Nelson et al., 2020). It is difficult to disentangle the effect of one specific type of adversity due to the co-occurrence of different adversities (Green et al., 2010), the association between adversities experienced at one stage and adversities experienced in the next stage (Künzi et al., 2021), and the influence of early life events on brain response to adulthood stressors (McEwen, 2007). Furthermore, the accumulation of adverse events may foster resilience (Seery et al., 2010). Therefore, the mechanistic pathways underlying the associations between adversity and cognition are still poorly understood.The present study investigated the association between life course adversity and later-life cognitive performance. Precisely, to avoid mixing types of adversity and contradictory findings, this study focused on one type of adversity accumulated over the life course (i.e., maltreatment) and executive function (i.e, cognitive flexibility). In addition, two mechanisms that may underlie this relationship were examined (i.e., intra-individual variability in RT and depression).A path analysis was performed on the baseline population of the UK Biobank study (N = 73,489, Mdnage = 56, SDage = 7.63, 55.74% of women).Higher cumulative adversity was significantly associated with lower performance in cognitive flexibility (p < .001) and this effect was partly mediated by the level of depression (p < .001). This study highlights the role of depression in the association between cumulative adversity over the life course on performance in cognitive flexibility and the specificity of these findings to the combined life-course effect of cumulative adversity (i.e., maltreatment) over the life course on cognitive flexibility performance.