In fact, the principle of legality is not a new institution; The origin is given as the Magna Libertatum Carta by King John in 1215, as indicated by Magellan Noronha. However, it was not until the eighteenth century that this principle was enshrined in a definitive formula and spread throughout all nations. The current Brazilian Constitution of 1988 establishes the principle of legality for all persons in the national territory, according to the text of article 5, item II, “no one may be compelled to do or abstain from doing otherwise than by operation of law”. 8. The law should establish only severe and demonstrably necessary penalties, and no one©can be punished for the force of a law that was established, promulgated and lawfully enforced before the crime. It is therefore incomprehensible that the relevance of legal practices to the criminal law specialist does not exclude them on the ground that the principle of legality excludes any aspect of customary law in the application of the criminal law; On the contrary, it is an effective tool for a fair way for legal interpreters. The principle of legality, also©known as the principle of legal constraint, is framed in the text of the Federal Constitution itself by protecting fundamental rights and guarantees in its article 5ú, XXXIX, which contains the following: It represents an effective limitation of the punitive power of the State. Although it is now a basic principle of criminal law, its recognition has been the subject of a long process, with advances and setbacks, often nothing more than a mere “formal façade” of some States. Feuerbach enshrined the principle at the beginning of the 19th century with the formula nullum crimen Nulla poena sine lege.
The principle is an imperative that does not allow deviations or exceptions, because it represents a realization of legal conscience that obeys the requirements of justice that only totalitarian regimes have denied. In squeamati terms, it can be said that the elaboration of binding norms is an exclusive function of the law, that is, no act can be considered a crime and no criminal sanction can be applied without this fact occurring, there is a law that defines it as a crime and commits the corresponding penalty. The Federal Constitution of 1988, through the protection of fundamental rights and guarantees in Article 5, Inc. XXXIX, stipulates that there shall be no crime without a prior law defining it, or punishment without prior judicial action. For the principle to be effective, it is necessary for the criminal legislature to avoid, as far as possible, the use of vague or ambiguous expressions in order to avoid the imposition of arbitrary sanctions or differentiated disciplinary regimes on anyone. For Claus Roxin, the principle of legal restraint is© an imperative that does not allow derogations or exceptions, and represents a realization of the principle of law, which obeys the requirements of justification denied only to totalitarian regimes. Finally, it should be borne in mind that the principle of legal coercion is not limited to the characterization of criminal offences, but also extends to their legal consequences, ©including punishment and level of security; Otherwise, citizens would have no way of knowing what the consequences might be and would lose legal certainty altogether. According to Rogío©Greco, a criminal law seeking a guarantor should necessarily distinguish between the criteria©of formal and substantive legality, both of which are essential for the application of criminal law.
Formal legality refers to the service provided for in the procedural procedures provided for by the Constitution, so that a particular legal document can become part of our legal system. In other words, it refers to the observability of the formalities laid down by law for the application of criminal law. Substantive legality, on the other hand, is based on issues that focus on the content of the norm and respect its prohibitions and sanctions to guarantee our fundamental rights provided for therein. It is a question of respecting and observing the content of the rules that guide the application of criminal law. The principle of legality set forth in point II of article 5 of the CF includes the freedom of the Brazilian citizen and stipulates that he is obliged to perform or abstain from a positive or negative act only if there are previous legal provisions. The prosecution mechanism cannot be understood without first resorting to the principle of legality, also known as the principle of legal constraint, which postulates that it will be established alongside constitutional guarantees for the protection of the rights and freedoms of the individual. The examination of this principle is therefore essential for the correct analysis of the functioning of criminal law in the context of our current rule of law. One of the objections is preliminary: whether the Supreme Court would have jurisdiction to rule on the injunction in criminal matters (or actually issue it) or whether this would constitute a violation of the separation of powers and the principle of legality. First, the legal reservation establishes legality by indicating the source of criminal law. Only the law in the strict sense can legislate in criminal matters. The importance of such a restriction can be indicated by at least two justifications: only the persons who represent the citizens, that is, who run the state (parliament), can restrict freedom, which prevents judges from creating the rules.
In addition, the legislative process allows for interventions and (theoretically) effects on the population in the drafting of onerous legislation. This principle, traditionally expressed in the rule nullum crimes nulla poena sine lege and generally enshrined in the introductory provisions of the modern penal code, is rooted in the Magna Carta of England (1215) and the North American Petitions of Rights, but was specifically formulated in the Declaration of the Rights of Man of the French Revolution: “No one can be punished unless: under a law enacted and legally enforced before the crime. 8.).  In defence of the broad interpretation – to the extent necessary for a proper understanding of the rule – against those who accuse it of violating the principle of legality, Assis Toledo proposes guidelines that can serve as a criterion for the application of the law when interpreting statutes: However, it is important not to confuse the analogy with the broad interpretation, Although the latter has certain limitations, it is by no means precluded from applying in cases where the content of the legislation allows it to extend the scope of the incident beyond what its concepts might properly speak. Magalhães Noronha confesses in a masterful lesson: the principle of legality is therefore one of the foundations of the Brazilian legal system, and all norms must respect this notion of nullity of sentence in the case of a previous rule. The postulate has been published since the Federal Constitution of 1988 and is part of the Brazilian Penal Code. Thus, according to the principle of legality, the State will regulate relations and conduct only through a legal process based on the rule of law. This prevents authoritarian decisions by political leaders from preventing citizens from enjoying their fundamental rights and guarantees, such as freedom of expression and the right to come and go. “(…) By emphasizing criminal law, this commandment first finds the principle of reserve, which prohibits any indictment without prior definition of the law. It can therefore be concluded that analogy, customs and general principles of law do not create new criminal figures or new legal sanctions: there are no gaps in criminal law in this area, since anything that is not punishable by express legislation should be considered a criminally lawful act”.
According to Guilherme de Souza Nucci, the principle of legality can be defined as follows: in civil proceedings, it appears expressly in Article 8 of the CPC/2015 when it implies that the judge is obliged to apply the legal order. In other words, in the exercise of the judicial function (the function of administration of justice), the court must respect the application of the principle of legality. The principle of legality, according to which no act may be regarded as a criminal offence and no criminal sanction may be imposed unless the same circumstance is established by law as to the nature of the offence and the penalty in question, constitutes a genuine limitation of the State`s power to intervene in the field of individual freedoms.  The principle in anairis represents an effective limitation of the punitive power of the state, enshrined in nullum crimen, nulla poena sine praevia lege: there will be no crime and there will be no punishment without a law©defining it.