General Background: Online gambling has developed into a social issue affecting family stability and creating new challenges for legal institutions. Specific Background: In divorce cases at the Religious Court of Surabaya, judges face challenges when addressing online gambling because existing legal provisions do not explicitly regulate it as a divorce ground. Knowledge Gap: Previous studies have mainly examined the social and causal relationship between online gambling and divorce, while the construction of judicial reasoning used by judges has received limited attention. Aims: This study aims to examine how judges construct legal reasoning when using online gambling as a basis for divorce in Decision Number 1800/Pdt.G/2026/PA.Sby. Results: Using a qualitative case study combined with socio-legal studies, data were collected through interviews with a senior judge of the Religious Court of Surabaya and analysis of court documents. The findings show that judges do not merely apply legal provisions formally but develop complex reasoning involving purposive interpretation, contextualization of digital social realities, and substantive justice considerations. Maqāṣid al-syarī’ah functions as one reasoning framework supporting judicial decisions beyond literal legal texts. Novelty: This study reveals the gap between written judgments and the actual judicial reasoning process in addressing digital-era family law issues. Implications: The research contributes to understanding judicial decision-making processes in religious courts when responding to emerging digital social phenomena. Highlights: Judges apply contextual interpretation beyond formal legal provisions in online gambling divorce cases. Judicial reasoning involves legal interpretation, digital social realities, and justice considerations. Maqāṣid al-syarī’ah is used as a reasoning framework in judicial decision construction. Keywords: Legal Reasoning, Online Gambling, Religious Courts, Substantive Justice.