كتاب الصيام
13  
The Book of Fasting
(37)
Chapter: Fasting at the end of Sha'ban
(37)
باب صَوْمِ سَرَرِ شَعْبَانَ ‏
Sahih Muslim 1161 d

'Imran b. Husain (Allah be pleased with them) reported that the Messenger of Allah (ﷺ) said to a person:

Did you observe fast in the middle of this month. i. e. Sha'ban? He said: No. Thereupon he said to him: When it is the end of Ramadan, then observe fast for one day or two (Shu'ba had some doubt about it) but he said: I think that he has said: two days.
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنِ ابْنِ أَخِي، مُطَرِّفِ بْنِ الشِّخِّيرِ قَالَ سَمِعْتُ مُطَرِّفًا، يُحَدِّثُ عَنْ عِمْرَانَ بْنِ حُصَيْنٍ، - رضى الله عنهما - أَنَّصلى الله عليه وسلم قَالَ لِرَجُلٍ ‏"‏ هَلْ صُمْتَ مِنْ سِرَرِ هَذَا الشَّهْرِ شَيْئًا ‏"‏ ‏.‏ يَعْنِي شَعْبَانَ ‏.‏ قَالَ لاَ ‏.‏ قَالَ فَقَالَ لَهُ ‏"‏ إِذَا أَفْطَرْتَ رَمَضَانَ فَصُمْ يَوْمًا أَوْ يَوْمَيْنِ ‏"‏ ‏.‏ شُعْبَةُ الَّذِي شَكَّ فِيهِ قَالَ وَأَظُنُّهُ قَالَ يَوْمَيْنِ ‏.‏
Reference : Sahih Muslim 1161d
In-book reference : Book 13, Hadith 259
USC-MSA web (English) reference : Book 6, Hadith 2609
  (deprecated numbering scheme)