On the authority of al-Nawwaas ibn Samaan (RadhiAllahu Anhu) from the Prophet (SallAllahu Alayhi Wa Sallam) who said:
“Righteousness is good character. And sin is that which wavers in your soul and which you dislike the people finding out about.”
[Recorded by Muslim]

“Righteousness is good character”
The Arabic word birr translated here as ‘righteousness’ can be used in two senses. The first is to mean treating others in a good fashion, in particular one’s parents, though more generally it means to behave well towards everyone. When birr is used in this fashion in the Qur’an it is usually used in conjunction with tawqa or fear of Allah. Allah (Subhanahu Wa Ta’ala) says in the Qur’an:
“Help you one another in al-birr and al-taqwa”
(Surah al-Maaidah:2)

The second sense in which the word birr is used is to refer to acts of worship and obedience to Allah (Subhanahu Wa Ta’ala) both inward and outward. We can see an example of this in the following verse of the Qur’an:

“It is not al-birr (righteousness) that you turn your faces toward east or west [in prayers]; but al-birr is [having] belief in Allah, the Last Day, the angels, the Book, the prophets, and giving one’s wealth, in spite of love for it, to the kinsfolk, to the orphans, to the poor, to the wayfarer, to those who ask and to set slaves free; [it also includes those who] establish the prayer, give the zakat, fulfill their covenant when they make it, and who are patient in extreeme poverty and ailment and at the time of fighting. Such are the people of the truth and they are the pious.”
(Surah al-Baqarah: 177)

The concept of righteousness then, incorporates treating others in the best way possible, believing in Allah (Subhanahu Wa Ta’ala) and all that He (Subhanahu Wa Ta’ala) has revealed, giving in charity, keeping promises, being truthful, patient and performing acts of obedience and worship of Allah (Subhanahu Wa Ta’ala).

The concept of character (in Arabic khuluq) in Islam incorporates a combination of understanding, intention and deeds with the last two aspects playing the most important role. If a person has good intentions followed by good deeds, it is said that they have good character. If a person has bad intentions followed by bad deeds it is said that they have a bad character.

The scholars have discussed the concept of good character, as it is understood in Islam, in great detail.

Good character with respect to the Creator is said to incorporate three necessary aspects: sincere belief in what Allah (Subhanahu Wa Ta’ala) has revealed without any doubts; acceptance of the commands of Allah (Subhanahu Wa Ta’ala) and striving to fulfill them; and accepting the Allah’s decrees with pleasure and patience.

Good character with respect to the creation incorporates being kind, generous, forgiving, refraining from harming others, greeting them with a smiling face and behaving in a way that brings them happiness. This also incorporates good behavior towards all the living things that Allah (Subhanahu Wa Ta’ala) has placed on the earth. The one who is closest to Allah (Subhanahu Wa Ta’ala) will be furthest away from causing any harm to His (Subhanahu Wa Ta’ala) creation, especially when they remember what Allah (Subhanahu Wa Ta’ala) has said:
“The seven heavens and the earth and all that is therein glorify Him. There is not a thing but glorifies His praise, but you understand not their glorification. Truly, He is ever forbearing, oft-forgiving”
(Surah al-Israa:4)

Finally, good character with respect to oneself relates to how one deals with one’s own soul. One should nurture one’s soul, do what is best for it and treat it kindly. The ultimate pleasure of the soul comes from worship and obedience to its Creator, and this satisfaction can be deepened through attaining the knowledge necessary to follow the Straight Path.

We can see from this that the Islamic concept of character is all inclusive, and incorporates good conduct towards the Creator, the creation, and oneself. For a person to have good character, they must have righteous conduct in all of these areas. It is not sufficient to be kind to your parents, but neglect your Creator. One cannot worship Allah (Subhanahu Wa Ta’ala) and neglect the creation, that is not considered good character. To have good character we must be righteous in all our conduct towards all living things.