BackgroundSelf-harm (SH) increases significantly in early adolescence with great variability, and childhood maltreatment (CM) contributes to this increase. Understanding the developmental pathway from CM to SH could provide clues for SH prevention. This study used latent class analysis (LCA) to detect the phenotype of SH and explored the role of psychological resilience in the pathway from the CM to SH phenotype.MethodsA cross-sectional study was conducted with 5724 early adolescents from three middle schools in Anhui Province, China. We categorized SH into five subtypes based on their severity and further explored SH phenotypes by LCA to detect the heterogeneity of SH. Moreover, a path model was performed to test the mediation of resilience in the CM-SH association.ResultsThe prevalence rates of highly lethal SH, less lethal SH with visible tissue damage, SH without visible tissue damage, self-harmful behaviours with latency damage and psychological SH were 10.2%, 25.8%, 35.5%, 20.8% and 28.2%, respectively. Three interpretable phenotypes of SH were identified: low SH (57.8%), medium SH (29.0%), and high SH (13.2%). Furthermore, CM was positively associated with the SH phenotype, psychological resilience mediated the association between CM and the SH phenotype (all ps < 0.01), and a larger mediating effect was observed in the medium SH (22.41%).ConclusionsOur findings offer new perspectives that improving psychological resilience can be used as an efficient intervention to reduce the risk of SH among early adolescents who have experienced CM.