One of the important factors that can affect employee performance (EP) is the employee’s perception of organizational justice (OJ) in the workplace and the employee’s willingness to carry out the employee’s primary role (in the role) optimally and the employee’s willingness to carry out tasks outside the employee’s primary job (extra-role), commonly called organizational citizenship behavior (OCB). OCB is divided into two dimensions: OCB at the individual level (OCBI) and OCB at the organizational level (OCBO). In educational organizations, the OCB of teachers is a strategic matter, so it needs to be a concern for school management if schools want to continue to survive and develop in the era of globalization characterized by changes in a dynamic and competitive environment. OCB from teachers can be said to be a form of teacher gratitude because the school has supported the welfare of teachers a lot, appreciates the contributions of teachers, and feels organizational justice practiced by the school. The respondents to the study were 820 full-time teachers from high schools and vocational high schools spread across several regions in East Java Province and Central Java Province, Indonesia, who were taken using convenient sampling techniques. This study aims to analyze: (1) the effect of OJ on OCBI and OCBO; (2) the direct effects of OJ and indirect effects on EP with OCBI and OCBO as mediation. Data analysis used the structural equation model (SEM) and Sobel test. The results of hypothesis testing show that: (1) OJ can significantly improve OCBI; (2) OJ can significantly improve OCBO; (3) the OJ was found to have a significant positive effect on EP; (4) OCBI can significantly improve EP; (5) OCBO can significantly improve EP; (6) OCBI partially mediates the influence of OJ on EP; (7) OCBO partially mediates the influence of OJ on EP. The results of this study explain the essential aspects of behaviour in the workplace, such as OJ, OCB, and EP, with a particular focus on high schools and vocational high schools in several regions in East Java Province and Central Java Province, Indonesia. The results showed that improving the EP of teachers can be achieved by organizational management through OJ practices in the work environment as well as organizational management efforts in improving the OCB of employees, considering that employees play an essential role in improving organizational performance.