Ibn Abbas reported that during the time of the Messenger of Allah ﷺ, a woman embraced Islam and then remarried. Her former husband came to the Prophet ﷺ and said, "Messenger of Allah, I had already accepted Islam, and she knew of my conversion."So the Messenger of Allah ﷺ took her back from her second husband and returned her to her first husband.
حدثنا نصر بن علي أخبرني أبو أحمد عن إسرائيل عن سماك عن عكرمة
قال أسلمت امرأة على عهد رسول الله ﷺ فتزوجت فجاء زوجها إلى النبي ﷺ فقال يا رسول الله إني قد كنت أسلمت وعلمت بإسلامي فانتزعها رسول الله ﷺ من زوجها الآخر وردها إلى زوجها الأول
Sourcing, [Its chain of transmission is daif] Baghawi narrated it in Sharh al-Sunnah, no. 2290, from the hadith of Abu Dawud, and Ibn Majah, no. 2008, from the hadith of Simak, through the same chain. See the preceding hadith for its defect.