It is narrated on the authority of Ibn Abbas that the Messenger of Allah (peace and blessings of Allah be with him) transmitted it from the Blessed and Great Lord: Verily Allah recorded the good and the evil and then made it clear that he who intended good but did not do it, Allah recorded one complete good in his favour, but if he intended it and also did it, the Glorious and Great Allah recorded ten to seven hundred virtues and even more to his credit. But if he intended evil, but did not commit it, Allah wrote down full one good in his favour. If he intended that also committed it, Allah made an entry of one evil against him.
(Sahih Muslim)
The present hadith brings into limelight the Infinite Mercy of Allah the Exalted – that He is the Most Merciful, the Most Forgiving, that He does not punish His slaves once they commit mistakes.
The hadith makes it abundantly clear that if we make up our mind to do good, Allah would give us a reward for this, since this intention in itself is an act of religious piety. It is the intention and the determination which exhort people to do a certain act. Without good intention, there can be no idea of good deeds.
If a man puts his intention into practice, he, in fact, makes an advance in virtue, because transmitting thought into practical reality is not something easy; it demands a good deal of sacrifice on the part of an individual. This is the reason why Allah in His Infinite Mercy would multiply his good deeds and credit them to his account.
On the other hand, when he intends to commit evil, but refrains from doing so for the fear of the Lord, he is rewarded by Allah with a good deed, for he has struggled hard to prevail upon his evil self.
This struggle against the evil within his mind is an act of inner piety and one has to put in a good deal of efforts in order to overcome evil promptings of one’s mind. The evil thought provide opportunities for the believers to wage a war against them.