BackgroundChildhood and peer experiences can influence adolescents’ perceptions of interpersonal relationships, which can, in turn, influence their emotional states and behavior patterns. Non-suicidal self-injury (NSSI) is now a common problem behavior among adolescents. The present study examined the role of childhood trauma and peer victimization in adolescents’ NSSI.MethodsA cross-sectional survey was conducted among 1783 adolescents (1464 girls and 318 boys) in the psychiatric outpatient clinics or wards of 14 psychiatric hospitals or general hospitals in nine provinces in China. Data were collected using the Multidimensional Peer Victimization Scale (MPVS), Short-form Childhood Trauma Questionnaire(CTQ-SF), and Functional Assessment of Self-Mutilation (FASM). Structural equation modeling (SEM) with latent variables was used to demonstrate the mediating role of peer victimization in the association between childhoodtrauma and NSSI.ResultsThe SEM analysis demonstrated that peer victimization plays a partial mediating role in the relationship between childhood trauma and NSSI. In addition, several covariates (such as age, gender, education level, and place of residence) effectively regulated the relationship between peer victimization and NSSI.ConclusionIn future studies of NSSI among Chinese adolescents, attention should be paid to the roles of childhood trauma and peer bullying; there is a temporal sequence between these two variables and, to some extent, childhood trauma can have an impact on bullying during adolescence which, in turn, influences NSSI behavior.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12888-023-04848-z.