Morality in the Qur'an

The primary source of Islam is the Qur'an. Almighty Allah (swt) conveyed His orders and recommendations for people through the Qur'an, which He sent down to the Prophet Muhammad (saw). The rulings of the Qur'an are sent by Allah (swt) to organize the religious and worldly lives of people, and they revolve around three main topics: iman, ibadah, and akhlaq: faith, worship, and morality. Therefore, the Qur'an teaches people not only how to have true faith and what worship they should do towards Allah, but also what moral features they should have in their daily lives.
"We have certainly created man in the best of stature; then We return him to the lowest of the low, Except for those who believe and do righteous deeds, for they will have an ajr (reward) uninterrupted." (Tin, 95/4-6) says our Almighty Lord (swt). According to this verse, even though human beings are superior to other beings in terms of creation, they can fall into an extremely worthless position because of bad behaviors and habits. People who believe in Allah (swt) and live as required by their faith will not fall into such a position. Moral people will be rewarded by Allah (swt), just as they will be loved by other people.
The Qur'an is a source of morality because it expresses what is right and what is wrong. It attempts to place many moral values in the lives of believers such as being honest, not lying or deceiving people, not opposing parents, not talking behind people's back, not being arrogant, nor seeing people as inferior. In line with this, it directly imposes orders and prohibitions, as well as concrete examples from history, people who have lived in previous societies and gained a reward or punishment for their moral characteristics.
Like the previous divine books, the primary goal of the Qur'an is to make people believe in the only God, Allah (swt). For this reason, the point that the Qur'an focuses on the most is the belief in the one and only Allah, that is, tawhid. Another point that is especially emphasized in the Qur'an, along with faith, is "good deeds". As a matter of fact, as we see in the verse “And as for those who believed and did righteous deeds, He will give them in full their rewards and grant them extra from His bounty.” (Nisa, 4/173) faith and good deeds are mentioned together in many verses.
There is a close relationship between faith and behavior. In the most general sense, when we consider faith as a promise made to the Creator, believing in the Creator will also require acting as He wishes. In this sense, being moral is also a requirement of faith. In other words, a believer who accepts the existence of the Creator and believes in Him promises to lead a life as the Creator wishes as a requirement of his faith. That is why the Qur'an emphasizes doing good deeds and mentions it along with faith.
Acts of worship like ritual prayer, fasting, and giving alms are a manifestation of a person's faith in Allah (swt), and it has a strong relation with morality. Worship primarily ensures that the communication between man and Allah (swt) is established and maintained in a healthy way, while at the same time it keeps people away from evil. For example, "Recite, [O Muhammad], what has been revealed to you of the Book and establish prayer. Indeed, prayer prohibits immorality and wrongdoing, and the remembrance of Allah is greater. And Allah knows that which you do." (Ankabut, 29/45) this verse states that ritual prayer will keep people away from doing evil if it is performed carefully and in accordance with its stipulated conditions. 
The fact that worship controls both thoughts and behaviors of people, and therefore improves their morals, is also valid for other types of worship such as giving alms and fasting. "...Fasting is a shield (that protects from evil, bad words and actions, and hellfire). When any one of you is fasting on a day, he should neither indulge in obscene language, nor raise the voice; or if anyone reviles him or tries to quarrel with him he should say: I am a person fasting." (Sahih Muslim, Sawm, 163) With this hadith, our Prophet (saw) pointed to the aspect of fasting that beautifies a person's morality and life.
In order for a society to live in peace and security, it is necessary that some moral behaviors are well rooted in it,  such as mutual respect, love, trust, solidarity, cheerful people, getting along with neighbors, giving gifts, helping those who are poor and in need, not being envious of someone else's property, not deceiving people, and hospitality towards guests. In addition to these, the Qur'an requires some other moral values in order to attain a peaceful society: not to investigate other people's private lives and defects; (Hujurat, 49/12)not being biased about people and not gossiping; not entering someone else's house without permission.(Nur, 24/27-28)

5