Desertion is a criminal offense that causes significant harm to multiple parties, particularly the perpetrator, their family, their military unit, and the state, which has invested substantial resources in their education and training. This study examines the following issues: how desertion committed by members of the Indonesian National Armed Forces (TNI) is regulated under applicable law; how the principles of military necessity are applied in adjudicating desertion cases involving TNI personnel; and how the ratio decision of military court judges is implemented in such cases, based on Decision No. 30-K/PM.I-02/AD/IV/2023 and Decision No. 34-K/PM.102/AD/IV/2023. This research employs a normative legal approach. The findings indicate that the legal framework governing desertion by TNI members is regulated under Article 87 paragraphs (2) and (3) of the Indonesian Military Criminal Code (KUHPM). Article 87 paragraph (2) provides that desertion committed during peacetime is punishable by imprisonment for a maximum of 2 years and 8 months, while paragraph (3) provides that desertion committed during wartime is punishable by imprisonment for a maximum of 8 years and 6 months. However, the KUHPM contains several terms that give rise to multiple interpretations, particularly regarding the concept of peacetime. The principle of military necessity in adjudicating desertion cases involving TNI members is inseparable from three fundamental principles: the principle of unity of command, the principle of command responsibility, and the principle of military necessity itself. These principles form the basis for examining desertion cases involving active TNI personnel. The ratio decidendi of military court judges in these cases, as reflected in Decision No. 30-K/PM.I-02/AD/IV/2023 and Decision No. 34-K/PM.I-02/AD/IV/2023, shows that the panel of judges found the defendants guilty of committing desertion on the grounds that they intentionally carried out the act and deliberately ceased performing their duties as military personnel, and that the acts were committed during peacetime