كتاب التوبة
50  
The Book of Repentance
(7)
Chapter: The Words Of Allah The Most High: "Verily, The Good Deeds Remove The Evil Deeds"
(7)
Sahih Muslim 2763 a

'Abdullah b. Mas'ud reported that a person kissed a woman and he came to Allah's Apostle (ﷺ) and made a mention of that to him. It was (on this occasion) that this verse was revealed:

" And observe prayer at the (two) ends of the day and in the first hours of the night. Surely, good deeds take away evil deeds. That is a reminder for the mindful" (xi. 115). That person said: Allah's Messenger, does it concern me only? He (the Holy Prophet) said: It concerns every one of my Unimah, who acts according to it.
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، وَأَبُو كَامِلٍ فُضَيْلُ بْنُ حُسَيْنٍ الْجَحْدَرِيُّ كِلاَهُمَا عَنْ يَزِيدَ، بْنِ زُرَيْعٍ - وَاللَّفْظُ لأَبِي كَامِلٍ - حَدَّثَنَا يَزِيدُ، حَدَّثَنَا التَّيْمِيُّ، عَنْ أَبِي عُثْمَانَ، عَنْ عَبْدِ اللَّهِ، بْنِ مَسْعُودٍ أَنَّ رَجُلاً، أَصَابَ مِنِ امْرَأَةٍ قُبْلَةً فَأَتَى النَّبِيَّ صلى الله عليه وسلم فَذَكَرَ لَهُ ذَلِكَ - قَالَ - فَنَزَلَتْ ‏{‏ أَقِمِ الصَّلاَةَ طَرَفَىِ النَّهَارِ وَزُلَفًا مِنَ اللَّيْلِ إِنَّ الْحَسَنَاتِ يُذْهِبْنَ السَّيِّئَاتِ ذَلِكَ ذِكْرَى لِلذَّاكِرِينَ‏}‏ قَالَ فَقَالَ الرَّجُلُ أَلِيَ هَذِهِ يَا رَسُولَ اللَّهِ قَالَ ‏ "‏ لِمَنْ عَمِلَ بِهَا مِنْ أُمَّتِي ‏"‏ ‏.‏
Reference : Sahih Muslim 2763a
In-book reference : Book 50, Hadith 47
USC-MSA web (English) reference : Book 37, Hadith 6655
  (deprecated numbering scheme)