كتاب الإيمان
1
The Book of Faith
(40)
Chapter: The evidence that the one who dies not associating anything with Allah will enter paradise, and the one who dies as idolator will enter the fire
(40)
باب مَنْ مَاتَ لاَ يُشْرِكُ بِاللَّهِ شَيْئًا دَخَلَ الْجَنَّةَ وَمَنْ مَاتَ مُشْرِكًا دَخَلَ النَّارَ ‏‏
Sahih Muslim 94 b

Abu Dharr reported,:

I came to the Apostle (may peace be upon him ) and he was asleep with a white mantle over him. I again came, he was still asleep, I came again and he had awakened. I sat by his side and (the Holy Prophet) observed: There is none among the bondsmen who affirmed his faith in La illaha ill-Allah there is no God but Allah) and died in this state and did not enter Paradise. I (Abu Dharr) said: Even if he committed adultery and theft? He (the Holy Prophet) replied: (Yes) even though he committed adultery and theft. I (again said): Even if he committed adultery and theft? He replied: (Yes) even though he committed adultery and theft. (Th Holy Prophet repeated it three times) and said for the fourth time: In defiance of Abu Dharr. Abu Dharr then went out and he repeated (these words): In defiance of Abu Dharr.
حَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، وَأَحْمَدُ بْنُ خِرَاشٍ، قَالاَ حَدَّثَنَا عَبْدُ الصَّمَدِ بْنُ عَبْدِ الْوَارِثِ، حَدَّثَنَا أَبِي قَالَ، حَدَّثَنِي حُسَيْنٌ الْمُعَلِّمُ، عَنِ ابْنِ بُرَيْدَةَ، أَنَّ يَحْيَى بْنَ يَعْمَرَ، حَدَّثَهُ أَنَّ أَبَا الأَسْوَدِ الدِّيلِيَّ حَدَّثَهُ أَنَّ أَبَا ذَرٍّ حَدَّثَهُ قَالَ أَتَيْتُ النَّبِيَّ صلى الله عليه وسلم وَهُوَ نَائِمٌ عَلَيْهِ ثَوْبٌ أَبْيَضُ ثُمَّ أَتَيْتُهُ فَإِذَا هُوَ نَائِمٌ ثُمَّ أَتَيْتُهُ وَقَدِ اسْتَيْقَظَ فَجَلَسْتُ إِلَيْهِ فَقَالَ ‏"‏ مَا مِنْ عَبْدٍ قَالَ لاَ إِلَهَ إِلاَّ اللَّهُ ثُمَّ مَاتَ عَلَى ذَلِكَ إِلاَّ دَخَلَ الْجَنَّةَ ‏"‏ ‏.‏ قُلْتُ وَإِنْ زَنَى وَإِنْ سَرَقَ قَالَ ‏"‏ وَإِنْ زَنَى وَإِنْ سَرَقَ ‏"‏ ‏.‏ قُلْتُ وَإِنْ زَنَى وَإِنْ سَرَقَ قَالَ ‏"‏ وَإِنْ زَنَى وَإِنْ سَرَقَ ‏"‏ ‏.‏ ثَلاَثًا ثُمَّ قَالَ فِي الرَّابِعَةِ ‏"‏ عَلَى رَغْمِ أَنْفِ أَبِي ذَرٍّ ‏"‏ قَالَ فَخَرَجَ أَبُو ذَرٍّ وَهُوَ يَقُولُ وَإِنْ رَغِمَ أَنْفُ أَبِي ذَرٍّ ‏.‏
Reference : Sahih Muslim 94 b
In-book reference : Book 1, Hadith 179
USC-MSA web (English) reference : Book 1, Hadith 172
  (deprecated numbering scheme)