This study discusses the application of contra legem in the custody (?adhanah) decision following a divorce involving a child who has not yet reached the age of discernment (non-mumayyiz), with a focus on Decision No. 361/Pdt.G/2018/PA.Dps. The research concentrates on three main aspects: the custody rights of non-mumayyiz children, the impact of divorce on caregiving responsibilities, and the legal conflict in the application of custody laws. The method used is normative juridical research, emphasizing the analysis of statutory regulations, legal literature, and relevant legal concepts. The data sources include primary, secondary, and tertiary legal materials. The analysis is conducted qualitatively using juridical, sociological, and shar’i approaches. The findings indicate that Decision No. 361/Pdt.G/2018/PA.Dps is contra legem, deviating from the default legal provisions that assign ?adhanah to either the father or the mother. However, within the framework of Maq??id al-Shar??ah, custody was granted to the maternal grandmother based on legitimate shar’i grounds. Although the mother was deemed nasyuz (disobedient), and the father had a history of domestic violence, the court prioritized the child’s emotional welfare and stability. Therefore, placing the child with the maternal grandmother was considered the most appropriate choice to protect the child’s ma?la?ah (best interest) and fulfill the objectives of Islamic law (maq??id al-shar??ah). The decision aimed to safeguard the child’s life and intellect (?if? al-nafs and ?if? al-?aql). The ?illah qawiyyah (strong legal reasoning) in this case lies in the fact that both parents were deemed unfit, leading the judge to assign custody to the nearest capable relative — the maternal grandmother.