Background: Collective violence is a significant global and national social and health issue, particularly in Iran. Objectives: This study investigated the impact of peer relationships, moral development, and family relationships on collective violence, with the mediating role of psychological security, among male high school students in Mashhad. Methods: This correlational study involved a statistical population of all male high school students in Mashhad, with a sample size of 1,300 selected through cluster sampling. The tools used included multidimensional questionnaires: The Multidimensional Peer Acceptance of Collective Violence (MPACV) scale, the Moral Development Questionnaire (MDQ), Fine's Parent-Child Relationship Questionnaire (FP-CRQ), the adolescent peer relations instrument (APRI), and Maslow's Psychological Security Questionnaire (MPSQ). Data were collected between November 2023 and January 2024 and analyzed using SPSS18 and LISREL8.8 software. Path analysis was conducted to explore the relationships between variables. Results: The findings revealed that moral development has a negative and significant impact on collective violence (standard coefficient -0.16, significance coefficient -2.45). Additionally, the father-child relationship (standard coefficient -0.59, significance coefficient -8.98) and the mother-child relationship (standard coefficient -0.46, significance coefficient -7.06) negatively and significantly affect collective violence. In contrast, peer relationships positively and significantly influence collective violence (standard coefficient 0.24, significance coefficient 3.70). Psychological security plays a crucial mediating role: Moral development (standard coefficient 0.41, significance coefficient 6.21), the father-child relationship (standard coefficient 0.54, significance coefficient 8.24), and the mother-child relationship (standard coefficient 0.50, significance coefficient 7.65) positively and significantly affect psychological security, which in turn reduces collective violence (standard coefficient -0.24, significance coefficient -3.70). However, peer relationships negatively impact psychological security (standard coefficient -0.53, significance coefficient -8.06), contributing to increased collective violence. Conclusion: Enhancing moral development and strengthening family relationships can significantly reduce collective violence among students by improving their psychological security.