كتاب 88
88  
Book 88
(88)
Chapter 88
(88)
باب 88
Sahih al-Bukhari 6665
Narrated Ibn Mas`ud:
A man said, "O Allah's Messenger (ﷺ)! Shall we be punished for what we did in the Prelslamic Period of ignorance?" The Prophet (ﷺ) said, "Whoever does good in Islam will not be punished for what he did in the Pre-lslamic Period of ignorance and whoever does evil in Islam will be punished for his former and later (bad deeds).
حَدَّثَنَا خَلاَّدُ بْنُ يَحْيَى، حَدَّثَنَا سُفْيَانُ، عَنْ مَنْصُورٍ، وَالأَعْمَشِ، عَنْ أَبِي وَائِلٍ، عَنِ ابْنِ مَسْعُودٍ ـ رضى الله عنه ـ قَالَ قَالَ رَجُلٌ يَا رَسُولَ اللَّهِ أَنُؤَاخَذُ بِمَا عَمِلْنَا فِي الْجَاهِلِيَّةِ قَالَ ‏ "‏ مَنْ أَحْسَنَ فِي الإِسْلاَمِ لَمْ يُؤَاخَذْ بِمَا عَمِلَ فِي الْجَاهِلِيَّةِ، وَمَنْ أَسَاءَ فِي الإِسْلاَمِ أُخِذَ بِالأَوَّلِ وَالآخِرِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 6665
In-book reference : Book 88, Hadith 6665
USC-MSA web (English) reference : Vol. 1, Book 1, Hadith 6665
  (deprecated numbering scheme)