BackgroundSchool bullying remains a social problem and changing students’ attitudes towards bullying is crucial for effective prevention in schools. Based on social-ecological system theory, this study examines how school climate influences anti-bullying attitudes among students. Specifically, it studies how a competitive school environment influences these attitudes, and how students’ competitive attitudes mediate these attitudes.MethodsThe data for this study comes from The Programmed for International Student Assessment (PISA), which is a global student assessment initiative led by the Organization for Economic Co-operation and Development (OECD). The sample consists of 12,058 Chinese students from the 2018 PISA survey. Data analysis was conducted using STATA (version 14.0) software.ResultsSchool competitive climate has a positive and substantial impact on their anti-bullying attitudes (r = 0.1551, p < 0.001). Students’ competitive attitudes are also positively and significantly correlated with their anti-bullying attitudes (r = 0.2249, p < 0.001). Competitive attitudes partially mediate the relationship between the school bullying climate and students’ anti-bullying attitudes.ConclusionIn the context of Chinese education, a competitive school climate clearly has a positive effect on students anti-bullying attitudes. Students’ competitive attitudes also act as partial mediator in this relationship. These findings suggest that a healthy school ecosystem that reflects sound value guidance and fair rules is imperative for fostering anti-bullying attitudes in students.