The principle of legality is a legal concept part of the fundamental rights and guarantees of the individual, and establishes that there is no crime if it is not provided for by law.
The word principle means something that comes from the very beginning, the cause, which gives the basis. It is therefore a definition by which the theory develops. In the legal world, principles are postulates created to structure the rule of law.
Also know the meaning of rule of law.
Legality comes from legal, which means the characteristic of what is within the law. Every action created in accordance with the law integrates legality.
See also the meaning of Nice
The principle of legality is, therefore, one of the bases of the Brazilian legal system, and all norms must respect this notion of the nullity of punishment in the case of non-existence of a previous rule. The postulate appears since the Federal Constitution of 1988, as well as being part of the Brazilian Penal Code.
The synthesis of the principle of legality would be the Latin phrase
nullum crimen nulla poena sine lege, which in the Latin translation means that no crime will be punished without a law.Also according to the Principle of Legality no one is obliged to do or not to do something, unless provided for by law. This is what is contained in Article Fifth, Item II, of the Brazilian Constitution of 1988.
From the perspective of Criminal Law, the Principle of Legality can be understood as the individual guarantee that the legislator will not act in the creation of laws and penalties for facts that have happened previously.
For example, it was not provided by law that making graffiti on private walls is a crime, and there is no punishment for doing so. An individual performs such an act in one day. In the other, a law is introduced establishing a penalty of up to 05 years for anyone who vandalizes someone else's wall. The individual cannot be condemned for what he did the day before, only for what he might do after the law was published.
The principle of legality is an important part of Administrative Law, and limits the Public Administration to doing only what is provided for by law. According to Article 37 of the Federal Constitution, which says:
"Art. 37. The direct and indirect public administration of any of the Powers of the Union, the States, the Federal District and of the Municipalities will obey the principles of legality, impersonality, morality, publicity and efficiency(...)"
See also the meaning of Administrative law and understand what the Principles of Proportionality and Reasonableness.