Evidence from the Book of Allah and the Sunnah confirm that the punishment for sinning is removed from a servant for ten reasons:
The First: Tawbah, and this is agreed upon among the Muslims, Allah said:
Say, "O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful."
He - the Elevated - said:
Do they not know, that it is Allah who accepts repentance from His servants, and receives charities, and that it is Allah who is the Accepting of Repentance, the Merciful?
He - the Mighty - said:
And it is He who accepts repentance from His servants and pardons sin.
And similar Ayat.
The Second: Istighfar (Asking for forgiveness), as was collected in both Bukhari and Muslim that the Prophet ﷺ said:
If a servant sins and then says: My lord, I have sinned, so forgive me. Allah says:
My servant knows that he has a Lord who forgives sins or punishes for them. I have forgiven my servant.
Then he sins again and says: My lord, I have sinned again, so forgive me. His Lord says:
My servant knows that he has a Lord who forgives sins or punishes for them. I have forgiven my servant, so let him do what he wills. He says this at the third or fourth time.
And in Saheeh Muslim it is narrated that he said:
If you do not sin, Allah would remove you and bring a people who sin and then seek forgiveness, and he would forgive them.
It could be said that in this sense, Istighfar is with Tawbah, as was affirmed in a Hadeeth:
A person is not considered to be insistent [upon sin] as long as he keeps seeking forgiveness, even if he repeated the sin a hundred times in one day.
It could also be understood that Istighfar without Tawbah is possible and happens, but this is not the place to elaborate on the topic. However, if Istighfar is with Tawbah, then this ruling [in the aforementioned Hadeeth] is general to everyone who repents. But if [Istighfar] is practiced without Tawbah, then this ruling only applies to those whom - when they practice Istighfar - have an enhanced fear [of Allah] and turning to [Him], to the point that it erases sins. As was affirmed in the Hadeeth of al-Bitaqah, that the statement of: La ilaha illa Allah outweighs those sins when it is said with sincerity and truthfulness - which erase sins. Simillarly, the prostitute who gave a dog water to drink was forgiven because of what took place in her heart regarding Eman at the time, and there are plenty of other examples.
The Third: The good deeds that erase sins.
Allah the Glorified says:
And establish prayer at the two ends of the day and at the approach of the night. Indeed, good deeds remove sins.
The Messenger - ﷺ - said:
The five daily prayers, the Jum’ah to the Jum’ah, and Ramadan to Ramadan, are expiations for the [sins] between them, provided the major sins are avoided.
He - ﷺ - also said:
Whoever fasts Ramadan with sincere faith and hope [in Allah's reward], will have all his past sins forgiven.
Whoever stands in prayer on Laylatul Qadar, with sincere faith and hope [in Allah's reward], will have all his past sins forgiven.
Whoever performs pilgrimage to this House, and does not commit obscenities or sin, would return [home] without sin, like the day his mother gave birth to him.
The trials a man goes through with his family, his wealth and his children, are expiated with prayers, fasting, charity and promoting virtue and warning against vice.
Whoever frees a believing slave, for every limb/part [of the slave] that is freed, a limb/part of his body would [also] be freed from the fire, even the private parts.
These Ahadeeth and similar to them are collected in the authentic books of Hadeeth. He also said:
Sadaqah extinguishes sin like water extinguishes fire, and jealousy incinerates good deeds like fire incinerates wood.
The query about this understanding, that good deeds only expiate minor sins, but as for the major sins, then they are not forgiven except with Tawbah, as has been transmitted in some Ahadeeth:
…so long as the major sins are avoided.
The response is as follows…
The Fourth cause that repels punishment: The supplication of the believer for the believer, such as in the Funeral prayer, it has been reported by 'Aisha and Anas ibn Malik that the Prophet - ﷺ - said:
There is not a person who dies, and a group of one hundred Muslims pray for him [at his funeral], asking intersection for him, except that their intercession for him will be accepted.
Ibn 'Abbass narrated that he heard the Messenger of Allah - ﷺ - saying:
There is not a Muslim who dies, and 40 men who do not associate anything with Allah pray at his funeral, except that Allah would accept their intercession for him.
Both collected by Muslim
This is a supplication for him after he passes. So it cannot be derived that this forgiveness is for a righteous believer who avoided major sins, and had his minor sins expiated on his own. In such a case, he has [already] been forgiven according to the differing groups. Therefore, it is concluded that this supplication is a cause of forgiveness for the dead person [i.e. for the sins that remained after his death].
The Fifth: Good deeds that are performed on behalf of the dead person, such as charity and so on. This is indeed fruitful, as confirmed by clear textual evidence in the authentic Sunnah, and the consensus of the Muslims. Likewise, is the freeing of a slave and Hajj. Rather, it has been authentically reported in Bukhari and Muslim that he - ﷺ - said:
Whoever dies and has some missing days to fast, his custodian fasts on his behalf.
Similar has been authentically reported in other narrations regarding making up fasts due to oaths. There are two reasons why this does not contradict His – the Glorified’s - statement:
And there is not [a reward for good] for a person except for which he strives [for himself].
The first: It has been authentically reported in Mutawatir Ahadeeth, along with the consensus of the Salaf, that the believer benefits from acts not of his own doing, such as the supplication of the angels and their seeking of forgiveness for him, as affirmed in His statement:
Those (angels) who bear the Throne (of Allah) and those around it glorify the praises of their Lord, and believe in Him, and ask forgiveness for those who believe (in the Oneness of Allah)
The supplication of the prophets and the believers and their asking forgiveness for him as in the statement of the Elevated:
… and invoke Allah for them. Verily! Your invocations are a source of security for them.
And the Glorified’s statement:
And of the bedouins are some who believe in Allah and the Last Day, and consider what they spend in Allah’s Cause as means of nearness to Allah, and a cause of receiving the Messenger’s invocations.
The Mighty and Majestic’s statement:
and ask forgiveness for your sins, and also for (the sins of) the believing men and women.
Likewise, the supplication of those who pray for the deceased, and those who visit their graves – from the believers.
The second: The Ayah is not understood according to its apparent meaning; that a person is not [rewarded] except for his own deeds. This is true in that he is not entitled and does not deserve [reward] except from his own doing. As for the acts of others, then a person has no right over them and is not entitled to them, but this does not prevent Allah from benefiting him and showing mercy to him through them. Allah constantly shows mercy to His servants for reasons outside of their control. He – the Glorified – with His wisdom and mercy, bestows mercy over His servants due to causes others undertake, so that he may reward the former with the latter’s actions, and so He may bestow mercy upon them all, as has been confirmed in the authentic Hadeeth and he - ﷺ - said:
There is not a person who supplicates for his brother, except that Allah appoints an angel for him, every supplication he makes for his brother, the appointed angel says: Ameen, and the like for you.
It was also authentically reported that he - ﷺ - said:
Whoever prays for a funeral receives a mountain of reward, and whoever follows it receives two, the smaller of which is like
He can bestow mercy upon the one praying for the deceased due to his supplication, and also bestow mercy upon the deceased due to the living one’s supplication for him.
The Sixth Cause: The intercession by the Prophet - ﷺ - on behalf of sinners on the Day of Resurrection, as has been authentically reported in many Ahadeeth about the intercession, such as his - ﷺ - statement in the authentic Hadeeth:
My intersession is for those who have major sins amongst my people.
Likewise, his - ﷺ - statement:
I was given the option of either having half of my Ummah enter Jannah, or intercession. So I chose intercession because it is more general and encompasses more [people]. Do you think it’s for the righteous?
Rather it’s for the sinners, offenders and wrong doers.
The Seventh Cause: The calamities in this life that Allah expiates sins with, as was authentically reported in both Bukhari and Muslim that the Prophet - ﷺ - said:
Whatever afflicts a believer of pain, fatigue, anxiety, sorrow, grief or harm – even a thorn [prick] that bothers him – Allah would expiate some of his sins with them.
The Eighth Cause: The trials, pressure and terror that transpires in the grave, indeed this is amongst the things that expiate things.
The Ninth Cause: The tribulations, distress and severity of the Day of Resurrection.
The Tenth Cause: Allah’s mercy, pardon and forgiveness without any cause from His servants.