Discipline is an essential prerequisite for the success of students who memorize the Qur’an, and the pesantren environment plays a strategic role in supporting this process. This study aimed to examine the role of the pesantren environment in shaping the discipline of Qur’an-memorizing students at MTs Tahfizh Nurul Iman Karanganyar by conceptualizing the pesantren environment as an integrated educational system encompassing the social environment, the physical environment (facilities and infrastructure), and the pesantren’s academic culture. The study adopted a qualitative approach with a field research design, with data collected through observation, in-depth interviews, and documentation, and then analyzed interactively through data reduction, data display, and conclusion drawing. The findings show that the pesantren social environment played an important role in shaping student discipline through educators’ role modelling, musyrif supervision, and peer interactions among students that created social control and habituation of disciplined behavior. The pesantren physical environment contributed to structuring students’ activities through spatial organization, the availability of tahfizh facilities, and a structured activity schedule. The pesantren’s academic culture strengthened the internalization of disciplinary values through scheduled learning traditions, a system of memorization targets and evaluation, and the integration of spiritual values into academic activities. These three dimensions of the pesantren environment interacted with one another and continuously shaped the discipline of Qur’an-memorizing students in time management, learning, worship, and social behavior. This study affirms that the pesantren environment functions as a determinant factor in developing the disciplined character of tahfizh students based on Islamic educational values.