108 - حَدَّثَنَا الْحُمَيْدِيُّ، ثنا سُفْيَانُ قَالَ: ثنا الْأَعْمَشُ، عَنْ أَبِي وَائِلٍ، عَنْ عَبْدِ اللَّهِ قَالَ: قِيلَ: يَا رَسُولَ اللَّهِ أَنُؤَاخَذُ بِمَا كَانَ مِنَّا فِي الْجَاهِلِيَّةِ؟ فَقَالَ «مَنْ أَحْسَنَ مِنْكُمْ لَمْ يُؤَاخَذْ بِمَا عَمِلَ فِي الْجَاهِلِيَّةِ، وَمَنْ أَسَاءَ أُخِذَ بِالْأَوَّلِ وَالْآخِرِ»
Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrates: I asked, "O Messenger of Allah! Will we be held accountable for what we did during the time of ignorance?" The Noble Prophet (peace and blessings be upon him) said: "Whoever among you does good, he will not be held accountable for what he did during the time of ignorance, and whoever does evil, he will be held accountable for all his deeds, those done before and after."
Related hadith on this topic