The development of codes of medical ethics since the days of Hippocrates until the twenty-first century, is analyzed by the authors using the bioethical principles of Beauchamp and Childress. From the evolution of medical paternalism to the principle of autonomy, the authors created the theory of moral consensus to justify the prohibition of abortion and the recent admission of orthothanasia the Code of Medical Ethics in Brazil.