Background: Ethics, as one of the intellectual foundations from the most primitive human societies to today, has surrounded all human behaviors, from the most hidden to the most obvious aspects, by providing principles and rules for the well-being of people together. Ethics in medicine, as one of the branches of applied ethics, deals with ethical principles and rules in the field of medicine. On the other hand, although ethics itself is one of the independent intellectual topics, it is closely related to other intellectual foundations such as philosophy and is influenced by it. Many doctors of the first four centuries of Hejri, who were both doctors and philosophers, together with some Muslim philosophers, discussed moral issues in their works. This research deals with the ethical components in medicine and the impact of moral philosophy on it within the scope of the first four centuries of Islam. Conclusion: By examining the most important medical ethics books of Muslim Iranians until the end of the fourth century, components under the titles of medical ethics were extracted. Each of these components refer to one of the moral codes (praise of human behavior, refinement of self, virtue of reason and thought, volitionality of human action, human status and dignity) which are also considered in the philosophy of ethics. Since ethics was one of the branches of practical philosophy, Muslim doctors paid attention to it. For this reason, these doctors-philosophers devoted part of their writings to the virtue and praise of reason, suppression of ego, mentioning the consequences of untruth and avoiding emotional defects such as wonder, arrogance, envy, stinginess, anger, etc. The most important component that is mentioned in most of these sources is belief in God and seeing God as a watcher over the doctor's actions during treatment and considering him as the main healer. After that, attention is paid to the human dignity of the patients. This means that the doctor should pay attention to the patient as a human being who has human dignity and rank, not his color, race, religion, financial status and social class. But in order for the doctor to reach this stage of perfection, he must cultivate and refine his soul.