He divorced his wife while she was menstruating during the time of the Messenger of Allah ﷺ. Umar bin Khattab asked the Messenger of Allah ﷺ about this, and the Messenger of Allah ﷺ said, "Order him to take her back, then keep her until she becomes pure, then menstruates again, then becomes pure once more. After that, if he wishes, he may keep her, and if he wishes, he may divorce her before touching her. That is the waiting period which Allah, the Exalted, commanded for the divorce of women."
حدثنا القعنبي عن مالك عن نافع
أنه طلق امرأته وهي حائض على عهد رسول الله ﷺ فسأل عمر بن الخطاب رسول الله ﷺ عن ذلك فقال رسول الله ﷺ مره فليراجعها ثم ليمسكها حتى تطهر ثم تحيض ثم تطهر ثم إن شاء أمسك بعد ذلك وإن شاء طلق قبل أن يمس فتلك العدة التي أمر الله سبحانه أن تطلق لها النساء
Bukhari, Talaq, chapter "And Allah's saying, 'O Prophet, when you divorce women...'" etc, no. 5251, and Muslim, Talaq, chapter "Prohibition of divorcing a menstruating woman without her consent..." etc, no. 1471, from the hadith of Malik, through him. It is also in Muwatta (Yahya): 2/576.