And from amongst these examples is Allah’s statement,
“The example of those who disbelieve in their Lord is that they deeds are like ashes on which the wind blows forcefully on a stormy day; they shall not get aught of what they have earned. That is the extreme error (of straying from the right path.” (Surah Ibrahim:18)
Here, Allah has likened the deeds of the disbelievers in terms of their invalidity and lack of benefit, to ashes over which a strong wind blows on a stormy day. Thus, Allah makes their deeds resemble dust particles that are scattered by a violent wind that may never be retrieved or collected when the disbelievers are most in need of them. This is a result of the deeds not being based upon iman and ihsan, they are done for the sake of other than Allah or they do not conform to His Commands. For this reason, the disbelievers will not benefit at all from their deeds on the Day of Judgement and neither will they receive a speck of reward from Allah. This is because Allah, Exalted is He only accepts deeds that are performed sincerely for His sake (alone) and in conformity with His Laws. Thus deeds are of four types – one type is accepted whereas the three other types are turned down. The accepted deeds are the correct and sincere deeds and the meaning (of correct) is: To be from the acts legislated by Allah through His Messenger, peace and blessings of Allah be upon him; and the meaning of sincere is only for the sake of Allah. As for the other three types of deeds, they are the deeds that fail to meet the set requirements of an accepted deed.
A marvellous secret lies in the comparison of their deeds to ashes, as they both share some similarity; that is, fire burns both of them, and uproots their origins. All deeds that are performed for the sake of other than Allah, Most High, are not in conformity with His Laws, will be cast into Hell, and will be used to fuel the fire that will burn the ones who did these deeds, because Allah replaces their nullified deeds with punishment and fire. He will also replace the good deeds of those who performed them sincerely for His sake, with grace and life (in Paradise). Therefore, note that Allah will burnt nullified deeds until they become ashes, for whoever worships anything or anyone other than Allah, will enter Hell, as its fuel, along with his idols.
Paragons of the Qur’an by Ibn Qayyim al Jawziyyah Pages 72-73