This study addresses the increasing prevalence of deviant behaviors among students in the digital era, such as cyberbullying, exposure to inappropriate online content, and weakened self-control, which pose serious challenges to moral and character development in educational settings. The purpose of this research is to examine the role of character-based Islamic education as a preventive strategy against deviant behavior and to analyze the strategies implemented by Islamic Education (PAI) teachers in fostering students’ moral, spiritual, and social awareness. This study employed a qualitative approach using a descriptive method to obtain an in-depth and holistic understanding of the phenomenon. Data were collected through interviews, observations, and documentation involving PAI teachers and students in madrasah settings, and were analyzed thematically to identify key patterns and meanings. The findings indicate that character-based Islamic education plays a significant role in preventing deviant behavior by strengthening internal moral awareness, self-control, and ethical decision-making rooted in faith (iman) and piety (taqwa). Effective strategies include teacher role modeling (uswah hasanah), habituation of positive religious practices, integration of moral values into daily learning activities, and collaboration between schools, families, and communities. These strategies contribute to the development of positive social behavior, responsibility, discipline, and resilience against negative digital influences. The study concludes that character-based Islamic education offers a holistic and contextual preventive approach, emphasizing internal moral formation rather than external control, and is highly relevant for addressing contemporary behavioral challenges faced by students in the digital age.