Background Childhood maltreatment increases the risk of substance use and substance use disorder (SUD) in adolescence and adulthood, with social support potentially mitigating this relationship. However, research in Ethiopia on mediating factors remains limited. This study uses structural equation modeling (SEM) to evaluate the influence of childhood maltreatment on substance use and the mediating role of social support among students in Gondar Town, Northwest Ethiopia.Method A cross-sectional study was conducted from April 18 to May 9, 2023, among 1,235 preparatory and public high school students in Gondar Town who were selected via simple random sampling. Childhood maltreatment was assessed using the Childhood Trauma Questionnaire (CTQ), which yields a total score ranging from 28 to 140. For descriptive analysis, scores were categorized as "none" for values between 25 and 36 or as "some form of childhood maltreatment" for scores above 37. Substance use was measured using the Tobacco, Alcohol, Prescription Medication, and Other Substance Use (TAPS-1) tool. Problematic substance use was defined as any response greater than "never" within the past 12 months. Social support was evaluated using the Multidimensional Scale of Perceived Social Support (MSPSS). Structural equation modeling analyzed the relationships, calculating the mediation proportion.Results The median age was 17 years, with 63.24% female participants. Of the students, 85.42% reported a history of childhood maltreatment, 23.48% had problematic alcohol use, and 10.04% had problematic drug use in the past 12 months. Childhood maltreatment significantly increased substance use (beta = 1.181, 95% CI (lower, upper): 0.223-1.821). Specific maltreatment types-physical abuse (beta = 1.422, 95% CI (lower, upper): 0.590-2.423), sexual abuse (beta = 0.653, 95% CI (lower, upper): 0.652-1.320), emotional abuse (beta = 2.252, 95% CI (lower, upper): 1.402-4.307), physical neglect (beta = 4.101, 95% CI (lower, upper): 1.042-0.904), and emotional neglect (beta = 1.513, 95% CI (lower, upper): 0.831-3.059)-were positively associated with substance use. Social support negatively mediated 28.30% of this relationship, reducing the effect of maltreatment on substance use.Conclusion Physical abuse, sexual abuse, emotional abuse, physical neglect, and emotional neglect all increase the likelihood of substance use. However, social support mitigates the relationship between childhood maltreatment and substance use. These findings highlight the need for interventions strengthening social support to mitigate the impact of maltreatment on substance use in Ethiopia.