The school environment is one of the external factors associated with the development of discipline among students in undertaking educational activities and daily life at Islamic boarding schools. Although the school environment and discipline have been widely studied, research specifically analyzing the contribution of the school environment to students’ disciplinary attitudes at Pondok Pesantren Mu’allimin Muhammadiyah Pakan Sinayan remains limited. This study aimed to analyze the effect of the school environment on students’ disciplinary attitudes. The study employed a quantitative approach with an ex post facto associative design. The respondents consisted of 33 students in Grades X and XI who were selected based on the criterion that they remained actively engaged in learning activities. Data were collected using a Likert-scale questionnaire and analyzed with SPSS version 27 through validity, reliability, normality, linearity, and heteroscedasticity tests, simple linear regression, a t-test, and the coefficient of determination. The results showed that the school environment made a significant predictive contribution to students’ disciplinary attitudes (calculated t = 3.133 > critical t = 2.040; p = 0.004). The R² value of 0.240 indicated that the school environment explained 24% of the variation in students’ disciplinary attitudes, while the remaining 76% was associated with other factors not included in the research model. These findings confirm that a supportive school environment plays an important role in developing students’ disciplinary attitudes. This study provides an empirical contribution to research on character education in Islamic boarding schools. In practical terms, Islamic boarding school administrators need to establish an orderly, consistent, and conducive environment to strengthen student discipline.