Sincerity has been interpreted as being upright, sincere, truthful, pure, distant from show and ostentation in one's intention and conduct, and being closed to the things that cloud or foul one's heart. Purity of intention, straightforwardness in thoughts, not pursuing any worldly purposes in relations with Allah, and loyalty in servitude to Him are also included in the meaning of sincerity.
The Muslim believes in the great importance of intention and its importance for the remainder of his deeds, both of this world and the Hereafter. This is because all deeds are based on intention. Depending on the intention, the deed is either valid or void.
This belief in the necessity of having an intention for every deed, and the obligation to make the intention proper, is based on Allah's Words (which mean): "And they were not commanded except to worship Allah (being) sincere to Him in religion, inclining to truth, and to establish prayer and to give zakah (poor due). And that is the correct religion."[Quran 98:5]
Moreover Allah Said (what means): "Say (O Muhammad): 'Indeed, I have been commanded to worship Allah (being) sincere to Him in religion.'" [Quran 39:11]
This belief is also based on the words of Allah's Messenger : "Verily, all actions are but driven by intention and for everyone is what he intended."[Al-Bukhari and Muslim]
Allah's Messenger also said: "Certainly, Allah does not look at your shapes (appearance) or wealth. But He only looks at your hearts and deeds."[Al-Bukhari and Muslim]
The one who has a sincere intention is rewarded for a good deed and the one who has an evil intention will bear its burden, just like the one who did a sinful deed. All of that is due to intention alone.
At the Battle of Tabook, Allah's Messenger said: "There are people concerning whom you do not travel any distance, nor do you spend anything, nor do you pass any valley but they are with you in that matter." The people said, "How is that?" He said, "They have been restrained due to some excuse, but they are with us because of the good intention."[Al-Bukhari and Abu Daawood]
Sincere intention is what makes the non-combatant equal in reward to the combatant. It is what makes the non-Mujahid receive a reward like that of a Mujahid (one who fights for the sake of Allah).
Allah's Messenger has also said: "If two Muslims meet each other with their swords, then both the killer and the killed will be in the Hell-fire." Someone said, "O Allah's Messenger, that is the case for the killer but why should that be the case for the killed?" He answered, "Because he wanted to kill his companion."[Al-Bukhari and Muslim]
All of the above emphasize what a Muslim believes concerning the seriousness of intention and its extreme importance. A Muslim should base all of his deeds upon a pious intention. He also strives his best not to perform any deed without an intention or with an impure intention. The intention is the soul of the deed and what determines its value. The deed is sound if the intention is sound and the deed is wicked if the intention is wicked. The one who performs deeds without good intention is doing so out of disdainful show and pretence.
Furthermore, a Muslim believes that intention is an essential component for the acceptance of deeds, and a condition for the validity of the deed. He also knows that the intention is not simply a statement of the tongue, "O Allah, I intended such and such…" nor is it simply a thought in the mind.
Instead, it is the driving force in the heart towards performing a deed that is in accordance with a sound goal of bringing benefit or repelling harm, at present or in the future. The will also directs a person to perform a deed for the sake of Allah and to fulfill His Commands.
A Muslim, therefore, also believes that a permissible act may become an act of obedience, worthy of reward and recompense. At the same time, an act of worship, if it is done for the sake of other than Allah (void of a pious intention), then it becomes an act of disobedience worthy of punishment and burden. A Muslim also does not believe that an act of disobedience can be changed into an act of obedience simply due to a good intention.
For example, the one who backbites a person just to make another person feel better, has disobeyed Allah and has committed a sin. His "good intention" will not benefit him at all in consideration with Allah. Similarly, the one who builds a Mosque with money from prohibited sources will not be rewarded. One who attends singing and dancing parties or who purchases raffle tickets to support good purposes or for the sake of Jihad, is a sinner and will bear the burden of his sin, instead of being rewarded for what he has done.
Similarly, anyone who builds a dome over the grave of a pious person, slaughters an animal on his behalf or makes an oath on his behalf, all in the name of having love for pious people, is disobeying Allah and earning a sin for what he has done.
These previously mentioned deeds are sins, even if it was done with a pious intention. A deed is not transformed by a pious intention into an act of obedience unless it was something permissible in the Sharee'ah (Islamic law) in the first place. As for a forbidden act, it never becomes an act of obedience under any circumstances.
Finally, sincerity in intention is a matter between man and his Creator; nobody else can know the real intentions of people except Allah. A man who attains sincerity in intention does not consider whether others will praise, accuse or exalt or abase him, be aware of his deeds or not, or whether he will even gain reward or not in return for his deeds. He considers only the pleasure of Allah because Allah Says (what means): “…knows the secret and what is (even) more hidden.” [Quran 20:7]