In the article, the authors raise issues that are relevant for the modern legal system of Ukraine, related to the need to revive the military justice system and, in particular, military courts. The authors emphasize that during the peaceful existence of Ukraine, a dangerous illusion was formed in the society regarding the unnecessary functioning of military justice in the state, however, unforeseen realities fundamentally changed the liberal ideas of peacetime. After the beginning of the armed aggression of the Russian Federation against Ukraine, the work of many courts was completely paralyzed, the judges did not have an algorithm of actions in war conditions, they urgently left for safe cities, including outside the territory of Ukraine, leaving proceedings, documentation, unfinished cases. The study allowed the authors to come to the conclusion that in a situation of continuing armed aggression, the presence of powerful Armed Forces in the state, and when the country is forced to fight for its independence, it is the military courts that are able to ensure legality and exercise justice and judicial control in accordance with their subject jurisdiction. In order to determine the optimal model of military justice, the authors examined the genesis of approaches that existed in society and characterized its attitude to the system of military justice. They analyzed the precedent practice of the European Court of Human Rights, in the context of alleged violations of Art. 6 of the Criminal Code during the administration of justice by military courts, as well as systematized key approaches developed by the Court, which are proposed to be taken into account when restoring the system of military courts in Ukraine. In addition, the authors systematized the existing models of military justice in the world, identified correlations that, apparently, led to the rejection of military justice by some countries, provided detailed arguments about the need to restore it in Ukraine, and indicated promising directions for further scientific research in this area.