BackgroundSuboptimal medication adherence is a major reason for failure in the management of major depressive disorder (MDD), childhood trauma might be an essential risk factor of suboptimal medication adherence. This study aimed to comprehensively explore the associations between different types of childhood trauma and medication adherence among patients with MDD, and to test whether resilience has moderating effects on the foregoing associations.MethodsParticipants were from the Depression Cohort in China (ChiCTR registry number 1900022145), 282 MDD patients with completed both baseline and 12-weeks follow-up investigations were included in this study. The diagnosis of MDD was assessed by trained psychiatrists using the Mini-International Neuropsychiatric Interview (M.I.N.I.). Childhood trauma was evaluated using the Childhood Trauma Questionnaire-28 item Short Form (CTQ-SF), and resilience was evaluated using the Connor-Davidson Resilience Scale (CD-RISC). Demographic characteristics, depression symptoms, anxiety symptoms, suicidal ideation, suicidal attempt, insomnia symptoms, and painful somatic symptoms were also investigated. Participants were divided into groups of optimal and suboptimal adherence based on their Medication Adherence Rating Scale scores. Logistic regression and stratified analyses were performed.ResultsA total of 234 participants (83%) reported suboptimal medication adherence. After adjusting for covariates, CTQ total scores (AOR = 1.03, 95%CI = 1.01–1.06), CTQ measures of sexual abuse (AOR = 1.17, 95%CI = 1.01–1.37), and CTQ measures of physical neglect (AOR = 1.12, 95%CI = 1.02–1.23) were all associated with an increased likelihood of suboptimal adherence. There were significant moderating effects of resilience on the associations of childhood trauma (P = 0.039) and physical neglect (P = 0.034) with medication adherence. The stratification analyses showed that CTQ total scores and CTQ measures of physical neglect were independently associated with an increased risk of suboptimal adherence among patients with MDD with low-resilience or moderate-resilience, while not significantly associated with suboptimal adherence in those with high-resilience.ConclusionChildhood trauma was a significant risk factor of suboptimal adherence among patients with MDD, and resilience moderated the foregoing association. Obtaining a history of childhood trauma and assessing resilience may help identify patients with suboptimal adherence when providing MDD pharmacotherapy. Psychiatrists may consider enhancing resilience to cope with the adverse effects of childhood trauma on medication adherence.