“We said: ‘O Messenger of Allah, will we be taken to task for what we did in the Ignorance period?’ The Messenger of Allah ﷺ said: ‘Whoever does good in Islam (i.e., after becoming a Muslim) he will not be taken to task for what he did in the Ignorance period, but whoever does evil (i.e., after entering Islam) he will be taken to task for both the former and the latter.’”
قُلْنَا يَا رَسُولَ اللَّهِ أَنُؤَاخَذُ بِمَا كُنَّا نَفْعَلُ فِي الْجَاهِلِيَّةِ فَقَالَ رَسُولُ اللَّهِ ﷺ مَنْ أَحْسَنَ فِي الإِسْلاَمِ لَمْ يُؤَاخَذْ بِمَا كَانَ فِي الْجَاهِلِيَّةِ وَمَنْ أَسَاءَ أُخِذَ بِالأَوَّلِ وَالآخِرِ