Surah An-Nisa 4:18
وَلَيْسَتِ ٱلتَّوْبَةُ لِلَّذِينَ يَعْمَلُونَ ٱلسَّيِّـَٔاتِ حَتَّىٰٓ إِذَا حَضَرَ أَحَدَهُمُ ٱلْمَوْتُ قَالَ إِنِّى تُبْتُ ٱلْـَٔـٰنَ وَلَا ٱلَّذِينَ يَمُوتُونَ وَهُمْ كُفَّارٌ ۚ أُو۟لَـٰٓئِكَ أَعْتَدْنَا لَهُمْ عَذَابًا أَلِيمًا
But repentance is not [accepted] of those who [continue to] do evil deeds up until, when death comes to one of them, he says, "Indeed, I have repented now," or of those who die while they are disbelievers. For them We have prepared a painful punishment.
Translation: Saheeh International
Tafsir
Repentance is not for those who do evil deeds sins until when death approaches one of them and the pangs of death begin he says upon witnessing his predicament ‘Indeed now I repent’ for this would not avail him and would not be accepted from him; …
Excerpt from Tafsir al-Jalalayn, commentary on 4:18, via Quran.com. The reader has the full commentary and 9 more tafsirs.