Language:
كتاب مواقيت الصلاة
9  
Times of the Prayers
(4)
Chapter: As-Salat (the prayers) is expiation (of sins)
(4)
باب الصَّلاَةُ كَفَّارَةٌ
Sahih al-Bukhari 526

Narrated Ibn Mas`ud:

A man kissed a woman (unlawfully) and then went to the Prophet (ﷺ) and informed him. Allah revealed: And offer prayers perfectly At the two ends of the day And in some hours of the night (i.e. the five compulsory prayers). Verily! good deeds remove (annul) the evil deeds (small sins) (11.114). The man asked Allah's Messenger (ﷺ), "Is it for me?" He said, "It is for all my followers."

حَدَّثَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، عَنْ سُلَيْمَانَ التَّيْمِيِّ، عَنْ أَبِي عُثْمَانَ النَّهْدِيِّ، عَنِ ابْنِ مَسْعُودٍ، أَنَّ رَجُلاً، أَصَابَ مِنَ امْرَأَةٍ قُبْلَةً، فَأَتَى النَّبِيَّ صلى الله عليه وسلم فَأَخْبَرَهُ، فَأَنْزَلَ اللَّهُ ‏{‏أَقِمِ الصَّلاَةَ طَرَفَىِ النَّهَارِ وَزُلَفًا مِنَ اللَّيْلِ إِنَّ الْحَسَنَاتِ يُذْهِبْنَ السَّيِّئَاتِ‏}‏‏.‏ فَقَالَ الرَّجُلُ يَا رَسُولَ اللَّهِ أَلِي هَذَا قَالَ ‏"‏ لِجَمِيعِ أُمَّتِي كُلِّهِمْ ‏"‏‏.‏
Reference : Sahih al-Bukhari 526
In-book reference : Book 9, Hadith 5
USC-MSA web (English) reference : Vol. 1, Book 10, Hadith 504
  (deprecated numbering scheme)