The criminal-legal influence exerted on a person must be legal and justified, and the constitutional right of a person to inviolability must be reliably protected. Law enforcement practice shows that the rights of a person involved in criminal repression are especially vulnerable. Violations of personal freedom can be committed not only during the preliminary investigation, but also at the stages of proceedings in court and the execution of a sentence. Increasing the effectiveness of criminal law protection of the constitutional right to liberty and security of a person is possible provided that one refers not only to the Criminal Procedure Code of the Russian Federation, but also to other normative grounds for its permissible restriction, as well as to the mechanism of possible encroachments on the part of law enforcement officials and judges. The aim of the study was to identify threats to personal freedom in the sphere of criminal proceedings and the execution of sentences, which had not previously been an object of a study. Drawing attention to the existing gaps, the authors formulate a consistent and scientifically grounded proposal to improve the criminal law protection of the inviolability of the suspect, the accused, and the convicted. The methodological basis of the research was formed by dialectics as a doctrine of the development and interconnection of social phenomena. To achieve the aim, a normative approach was used in conjunction with general (analysis, synthesis, induction, deduction, formal-logical, structural) and specific (formal-legal, comparative) research methods. The authors show that the Penal Code of the Russian Federation allows the detention of convicts who maliciously evade the execution of punishment for up to 48 hours. This period can be extended by the court up to 30 days. In accordance with Paragraphs 18 and 18.1, Art. 397, of the Criminal Procedure Code of the Russian Federation, a convicted person hiding in order to evade serving a sentence and on other grounds specified in the law may be detained, but for not more than 30 days. Based on the analysis of judicial practice and scientists' positions, the authors of the article come to the conclusion that it is advisable to extend the prohibition contained in Art. 301 of the Criminal Code of the Russian Federation not only for the unlawful detention of a suspect and its extension, remand during the preliminary investigation, but also for the deliberately unlawful detention, its extension, and remand of a convicted person. Interpretation of Art. 301 of the Criminal Code of the Russian Federation as providing for responsibility and for knowingly illegal detention and its extension or remand of a convicted person is socially conditioned, and also complies with both the text of this norm and its place in the structure of the Special Part of the Criminal Code of the Russian Federation and in the chapter on encroachments on the interests of justice.