Language:
كتاب الأحكام
93  
Judgments (Ahkaam)
(50)
Chapter: Whoever violates a Bai'a
(50)
باب مَنْ نَكَثَ بَيْعَةً
Sahih al-Bukhari 7216

Narrated Jabir:

A bedouin came to the Prophet (ﷺ) and said, "Please take my Pledge of allegiance for Islam." So the Prophet took from him the Pledge of allegiance for Islam. He came the next day with a fever and said to the Prophet (ﷺ) "Cancel my pledge." But the Prophet (ﷺ) refused and when the bedouin went away, the Prophet said, "Medina is like a pair of bellows (furnace): It expels its impurities and brightens and clears its good."

حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا سُفْيَانُ، عَنْ مُحَمَّدِ بْنِ الْمُنْكَدِرِ، سَمِعْتُ جَابِرًا، قَالَ جَاءَ أَعْرَابِيٌّ إِلَى النَّبِيِّ صلى الله عليه وسلم فَقَالَ بَايِعْنِي عَلَى الإِسْلاَمِ‏.‏ فَبَايَعَهُ عَلَى الإِسْلاَمِ، ثُمَّ جَاءَ الْغَدَ مَحْمُومًا فَقَالَ أَقِلْنِي‏.‏ فَأَبَى، فَلَمَّا وَلَّى قَالَ ‏ "‏ الْمَدِينَةُ كَالْكِيرِ، تَنْفِي خَبَثَهَا، وَيَنْصَعُ طِيبُهَا ‏"‏‏.‏
Reference : Sahih al-Bukhari 7216
In-book reference : Book 93, Hadith 76
USC-MSA web (English) reference : Vol. 9, Book 89, Hadith 323
  (deprecated numbering scheme)