An Arabi came to the Prophet ﷺ and pledged allegiance to him upon Islam. Then he was struck by a fever, so he came back to the Prophet ﷺ and said, "Release me from my pledge."The Prophet ﷺ refused.He came again and asked the same, but the Prophet ﷺ refused. He came once more and said, "Release me from my pledge," but the Prophet ﷺ refused.The man then left, and when the Prophet ﷺ inquired about him, the people said, "He has departed."The Messenger of Allah ﷺ said, "Madinah is like a furnace. It expels its impurities and brings forth its purity."
حدثنا عبد الرحمن حدثنا مالك عن محمد بن المنكدر سمعت
جاء أعرابي إلى النبي ﷺ فبايعه على الإسلام فوعك فأتى النبي ﷺ فقال أقلني فأبى ثم أتاه فأبى فقال أقلني فأبى فسأل عنه فقالوا خرج فقال رسول الله ﷺ إن المدينة كالكير تنفي خبثها وتنصع طيبها
Its isnad is sahih. It is found in Bukhari, 13/200, no. 7209, in Fath al-Bari, in the Book of Rulings, chapter on the pledge of the Bedouins, via the route of Malik, from him, with its wording. Also in Muslim, 2/1006, no. 1383, in the Book of Hajj, chapter on Madinah expelling its evildoers. And in Ibn Abu Shayba, 12/180.