Sura An-Nisaa

4:18

وَلَيْسَتِ ٱلتَّوْبَةُ لِلَّذِينَ يَعْمَلُونَ ٱلسَّيِّـَٔاتِ حَتَّىٰٓ إِذَا حَضَرَ أَحَدَهُمُ ٱلْمَوْتُ قَالَ إِنِّى تُبْتُ ٱلْـَٰٔنَ وَلَا ٱلَّذِينَ يَمُوتُونَ وَهُمْ كُفَّارٌ ۚ أُو۟لَٰٓئِكَ أَعْتَدْنَا لَهُمْ عَذَابًا أَلِيمًۭا

Ångerns väg är inte öppen för den som [ständigt] begår dåliga handlingar och först då döden når honom säger: "Nu känner jag ånger", och inte heller för dem som dör som förnekare av sanningen; för dem har Vi ett plågsamt straff i beredskap.

Tafsir 4:18

Allah does not turn in mercy and forgiveness to those who continue in their disobedience, overstepping the limits and insisting on overstepping them, and not turning away from doing this until they are dying, then saying that they regret what they did and asking for Allah’s forgiveness. Also, Allah does not turn in mercy and forgiveness to those who die in disbelief – He has prepared a painful punishment for them.