The negative effect of adverse childhood experiences (ACEs) on children's mental health is widely explored. However, the mediating and moderating mechanisms underlying this relationship among children in mainland China are rarely investigated. This study examines the indirect link from ACEs to children's depressive symptoms and self-esteem through peer victimization and positive identity. Gender differences in the pathways are also discussed. A total of 775 primary and middle school students (mean age = 12.43, 9-16 years old, 46.3% males) in Dali city of Yunnan province voluntarily participated in a questionnaire survey. The ACEs, depressive symptoms, self-esteem, peer victimization, and positive identity were assessed via questionnaire survey using validated measurement tools. Structural equation model with Amos 24.0 was used to test the hypothesized theoretical model. The results showed that ACEs had a direct effect on children's depressive symptoms and self-esteem. Meanwhile, peer victimization and positive identity partially mediated the main effect. Moreover, four paths in the model showed significant gender differences, namely, from ACEs to depressive symptoms, from ACEs to peer victimization, from positive identity to depressive symptoms, and from positive identity to self-esteem. All of these paths showed that the moderating effect was stronger for males than for females. This study contributes to the current understanding of the mechanisms of ACEs on children's depressive symptoms and self-esteem. Findings also highlight that future intervention programs and social services for enhancing children's mental health must be more targeted to male victims of ACEs.