For school-age adolescents, teacher justice plays an important role in their learning and social outcomes. The present study examined the relation between teacher justice and students’ class identification in 1735 Chinese school-age adolescents by considering belief in a just world (BJW) and teacher–student relationship as mediators. Structure equation modeling (SEM) was used to reveal the direct and indirect effects. The analyses showed that all the direct and indirect effects were significant. These findings indicated that teacher justice had a positive effect on students’ class identification. In addition, teacher justice impacted students’ class identification through students’ just-world belief and teacher–student relationships. These results suggested that for adolescents, teacher justice played an important role in shaping their just-world belief system and their interpersonal relationships with teachers, which in turn affected their sense of belonging and values in relation to their class. Thus, it is important for teachers to be aware that their injustice may negatively impact their relationships with students, students’ belief systems, and their psychological engagement at school. There is a need to develop teacher-training programs to help teachers to establish classroom reward-punishment systems with the consideration of social justice, to communicate with students through an unbiased approach, and to increase student participation in the important decision making of the whole class.