وَالَّذِينَ كَفَرُوا أَعْمَالُهُمْ كَسَرَابٍ بِقِيعَةٍ يَحْسَبُهُ الظَّمْآنُ مَاءً حَتَّىٰ إِذَا جَاءَهُ لَمْ يَجِدْهُ شَيْئًا وَوَجَدَ اللَّهَ عِندَهُ فَوَفَّاهُ حِسَابَهُ ۗ وَاللَّهُ سَرِيعُ الْحِسَابِ (39)
(24:39) (On the other hand,) the deeds of those who disbelieved, *70 maybe likened to a mirage in a waterless desert, which the thirsty one took for water; but when he reached there he found nothing to drink; nay, he found there Allah Who settled his full account, and Allah is very swift at reckoning. *71
*70) That is, they refused to accept sincerely the Divine Message which was brought by the Prophets, and which at that time was being given by the Prophet Muhammad (Allah's peace and blessings be upon him). These verses clearly show that the truthful and righteouse believers only can benefit from Allah's Light. In contrast to them, the state of those people is being described here, who refused to believe and obey the Holy Prophet, who was the real and sole means of attaining the Light of Allah.
*71) This parable describes the condition of those people who, in spite of disbelief and hypocrisy, practise some good deeds and also believe, among other things, in the life after death in the hope that their good deeds will be of some help to thetas in the Hereafter even if they did not believe and follow the Prophet and lacked the qualities of true believers. In this parable they are being told that their expectations of reaping benefits of their ostentatious deeds of virtue in the Hereafter are no more than a mirage. Just as a traveller in the desert takes the glittering sands for a surging pool of water and runs towards it for quenching his thirst, so are these people travelling on the road to death cherishing false hopes on account of their good deeds. But just as the one running towards a mirage does not find anything there to quench his thirst, so will these people find nothing to avail them when they enter the state of death. On the contrary, they will find Allah there, Who will require them to account for their disbelief, hypocrisy and misdeeds, which they committed along with their ostentatious deeds of virtue, and will deal with them in full justice.