“Thus We established Joseph in the land, to settle wherever he wished. We bestow Our mercy upon whom We will, and We do not let the reward of those who do good go to waste.”
And He says:
“O descendants of those We carried with Noah! Indeed, he was a grateful servant.”
And He says:
“Except the family of Lot, whom We saved before dawn, as a favour from Us. Thus do We reward those who are grateful.”
And He says:
“And your Lord’s gracious promise to the Children of Israel was fulfilled because of their patience.”
There are many similar passages in the Quran.
The same applies to His accounts of the bliss and misery that will result from deeds, as in His words:
“Eat and drink with enjoyment because of what you sent ahead in days gone by.”
And His words, exalted is He:
“That is Paradise, which you have been made to inherit because of what you used to do.”
And His words:
“Those who believed and whose descendants followed them in faith—We will unite them with their descendants, without diminishing the reward of their deeds in any way.”
And His words:
“Today I have rewarded them for their patience: they are indeed the triumphant.”
And His words:
“And He rewarded them for their patience with Paradise and silk,” and the verses that follow.
And His words:
“Have the disbelievers been repaid for what they used to do?”
And His words:
“‘What brought you into Saqar?’ They will say, ‘We were not among those who prayed, nor did we feed the poor. We used to indulge in vain talk with those who did so, and we used to deny the Day of Judgement, until death came to us.’ So the intercession of intercessors will not benefit them.”
There are very many similar passages in the Quran. In His accounts of bliss and misery in the Hereafter, He, glorified is He, makes clear that these result from deeds—those commanded and those forbidden—just as He explains the same concerning the punishments and rewards He decrees in this world.