A woman came to the Prophet ﷺ and accepted Islam, and a man married her. Then her first husband came and said, "Messenger of Allah, I had accepted Islam along with her, and she knew of my conversion."So the Messenger of Allah ﷺ took her away from her second husband and returned her to her first husband.
حدثنا أحمد بن عبدة حدثنا حفص بن جميع حدثنا سماك عن عكرمة
أن امرأة جاءت إلى النبي ﷺ فأسلمت فتزوجها رجل قال فجاء زوجها الأول فقال يا رسول الله إني قد كنت أسلمت معها وعلمت بإسلامي قال فانتزعها رسول الله ﷺ من زوجها الآخر وردها إلى زوجها الأول
Sourcing, [Its chain of transmission is daif] Abu Dawud narrated it in the chapter on divorce, "If One of the Spouses Becomes Muslim," no. 2238 and 2239, through the hadith of Simak with the same wording. Tirmidhi graded it sahih, no. 1144, as did Hakim and Dhahabi. See no. 171 for its defect.