Purpose – This study aims to explore the role of Islamic Religious Education (IRE) in shaping the moral character of adolescents as a preventive effort against sexual deviance, particularly in urban areas of Indonesia. The study addresses the empirical gap concerning how Islamic values are internalized by adolescents within the context of digitalization and a permissive social culture. Design/methods/approach – This research employs a qualitative approach with an intrinsic case study design. Data were collected through in-depth interviews, participatory observation, and document analysis involving 25 informants in the Greater Jakarta area, including IRE teachers, junior high school students, parents, school leaders, and religious figures. Thematic analysis was conducted with reference to Bronfenbrenner’s ecological systems theory, Bandura’s social learning theory, and Erikson’s psychosocial development theory. Findings – IRE contributes to the development of adolescents’ moral resilience through teacher role modeling, contextual learning approaches, and the reinforcement of spiritual environments and open family communication. The main challenges arise from pedagogical limitations of teachers and the influence of digital media; however, collaborative strategies among schools, families, and communities have proven effective in supporting value internalization and self-regulation. Research implications – The findings underscore the necessity of training IRE teachers in Islamic sexual literacy and developing a synergistic educational ecosystem involving schools, families, and communities. A psycho-religious intervention model is recommended as a preventive educational strategy that is adaptive to adolescents’ realities. Nonetheless, the study is geographically limited to the urban Greater Jakarta area; thus, the findings require further validation in rural contexts with different social and cultural dynamics.