This study aims to analyze the influence of family, school, and community environments on the religious and social behavior of students at State Islamic Senior High Schools (MAN) in Hulu Sungai Tengah Regency. These three environments are seen as complementary educational centers in shaping students’ spiritual and moral character. Using a quantitative approach with a causal-comparative design, this study involved 248 respondents selected through stratified proportional random sampling. Data were collected through questionnaires, observation, and documentation, then analyzed using multiple linear regression. The results showed that all environmental variables had a positive and significant influence both partially and simultaneously. The family environment contributed 14.5% to students’ religious behavior and 13.7% to students’ social behavior. The school environment contributed 17.6% to religious behavior and 19.2% to social behavior, demonstrating the strong role of madrasas in fostering religious values and social interaction. Meanwhile, the community environment contributed the largest contribution, namely 20.8% to religious behavior and 20% to social behavior, emphasizing the role of the community as a space for practicing real morals. Simultaneously, the third environment explained 24.7% of the variance in students’ religious behavior and 28.2% in their social behavior. This finding confirms that character formation is inseparable from the synergy between family, school, and community. This research has significant implications for Islamic education management, particularly in strengthening collaboration between the third environment to achieve holistic, sustainable character development aligned with Islamic education principles.