The article provides an analysis of the legislative regulation of criminal prosecution of judges for making a deliberately unlawful decision or in violation of procedural law. International standards on of criminal liability of judges and judicial immunity, as well as judicial decision, and generalized approaches of legislators of other states to criminalization of rendering an unjust, illegal and/or unreasonable or biased judgement, and for comparison and other acts related to the performance of judicial duties. The article examines the provisions of the Criminal Procedure Code of Ukraine regarding the legality and validity of a court decision. A court decision is based on the principles of the rule of law, it must be made by a court in accordance with the substantive law and in compliance with the procedural law, and must meet the objectives of the relevant legal proceedings, but if it is made on the basis of insufficiently and comprehensively clarified circumstances, then it is an unreasonable court decision that is not deliberately unjust.
 The study was also based on the case law of national and international courts. The issue of interpretation of “criminal liability” was based on the study of the practice of the Constitutional Court of Ukraine. Compliance with the procedural procedure for bringing judges to criminal liability contributes to the observance of guarantees of their inviolability and independence, plays an important role in the resolution of criminal proceedings on the merits and is a prerequisite for observance of the general principles of criminal proceedings and the delivery of a lawful, reasoned and motivated court decision.
 The article highlights that the concepts of “injustice”, “illegality” and “unreasonableness” are not synonymous and have different procedural content.