Background: The main purpose of criminal law must be to secure the basic human rights or fundamental rights of individuals. But the matter is the relationship between morality and human rights. For the purpose of the science of morality is to bring humanity to the highest degree of humanity, and the purpose of law is to achieve relative justice and to restore order in society. Equity is also a means of assigning justice and tailoring its rules to specific cases. Thus, justice and equity are closely intertwined. Ethics and law are two sciences with two distinct goals, and some jurists believe that any confusion between ethics and law should be avoided. Therefore, this article examines the relationship between morality and fundamental rights. Conclusion: One of the positive steps that current judicial procedures can take to bring about justice for individuals is that it is true that morality should be avoided in any way. Obedience leads to the intellectual disengagement of lawyers and the departure from the goal of justice, and the excessive inclusion of ethics in the world of law causes the judge's personal emotions to replace legal principles. On the other hand, the main purpose of criminal law should be to safeguard human rights and maintain a moral framework. By enacting explicit, clear and understandable laws for all, the legislator will consolidate the principles of sound criminal policy and prevent violations of these rights.