The basis for all ethics in Islam is the Qur'an and the practices of the prophet Muhammad. Through the study, understanding and interpretation of these sources, a code of ethics specific to Islam was formed. The very foundation of the religion of Islam consists of submitting oneself to God, not only for each person but of the whole community.
The whole point of Islamic ethics is that in every aspect of each individual's life, that individual should be motivated to seek out and do good while at the same time avoiding evil and looking to stop it wherever it may lie. The example of the prophet Muhammad is key as a way for Muslims to realize how this may be done in practice. The other base for ethics in Islam is the belief in free will. The faculty that every man has to discover God and to submit to him. It is a choice that each person must make. It also grants each person the ability to use their reason to reflect and meditate about the reason for our existence on this Earth. According to the Qur'an, every human being that has received the word of God has a moral and ethical obligation to surrender his life to God. This is the highest aspiration and tenet of Islamic ethics.
The Qur'an teaches that the force that undermines this ethical obligation of each person is the need for material things, to be superior to the rest of the community. Surrendering oneself to God is the natural thing to do to ensure security in this life and the next; however, this is ultimately won over by the desire for material things and earthly power. The Qur'an teaches that this focus on earthly things and authority is a great obstacle to the personal reflection that each person must follow to discover God. A basic belief of all Muslims is that the prophet Muhammad and all the other prophets that preceded him, including Jesus Christ as well, were sent to remind humanity of their duty to God and to oppose those things that prevent man from discovering and surrendering his life to God.
In the context of the Middle East before Islam, there were five problems that Islam was trying to solve. The first of these was the division of the Arab people into a tribal society. A society that was severely fragmented into small patriarchal pockets that were based on family ties. The ethical ideal of Ummah, of a single Muslim community unified under God through the religion of Islam, was precisely the force needed to successfully bring such a fragmented society together. The second problem that Islamic ethics tried to solve was idolatry, the commonplace worship of multiple gods of an animist or mythological nature. It sought to solve this problem through a very strict monotheism; Islam constantly reminds its followers that there is no God other than Allah, nor anyone or anything may be worshiped or considered His equal. The third problem was a macho attitude, muruwwa or manliness, considered in those barbarous times as an ideal quality that each man should have. Islam was not against manliness but had a stronger emphasis on being humble and on traits like compassion and piety. The fourth problem was that the driving force of each person's life was on creating a legacy on this earth. Islam replaced this with the concept of personal responsibility for one's own faith in the afterlife; with the concept of God's judgment on the day of accounting. The final ethical problem that Islamic ethics faced was the focus on barbarian traditions that had been handed down for centuries. Islam changed this, making God's revelation and God's laws more important than any cultural or historical tradition that a particular tribe may have had.
With this change to Arabian society, Islam brought a new set of values and a new way of seeing life and the world. Looking back we realize the great change that this caused in life in the region and in the history that followed. From the Muslim point of view, the whole Arabian peninsula exemplified the state of an individual that is lost, not reflecting on God and seeking to find a path. Muhammad brought a sense of purpose and civilized ethics and society to the Arabian people. Many of the prior ethical obligations were preserved when they were beneficial to the community. However, they were always within the context of monotheism and surrendering to the one God, Allah. It is important to understand that in Islam, all ethics are based on religion. All morality comes from God, through the Qur'an and the prophet Muhammad's example. Without these, there is no code of ethics that a Muslim will obey or abide with, which becomes problematic when dealing with things that in Islam are prohibited.
-- Al Arabiya Digital