Divorcing a pregnant wife is in accordance with the Sunnah. There is a widespread notion among the common people that it is contrary to the Sunnah, but there is no basis or evidence for this view.
Muslim (1471) narrated the story of how Ibn ‘Umar divorced his wife, in which it is narrated that the Prophet (peace and blessings of Allaah be upon him) said: “Tell him to take her back then divorce her when she is pure (i.e., not menstruating) or is pregnant.”
Al-Nawawi said in Sharh Muslim:
This indicates that it is permissible to divorce a pregnant woman whose pregnancy is established. This is the view of al-Shaafa’i. Ibn al-Mundhir said: This is also the view of most of the scholars, including Tawoos, al-Hasan, Ibn Sireen, Rabee’ah, Hammaad ibn Abi Sulaymaan, Maalik, Ahmad, Ishaaq, Abu Thawr, and Abu ‘Ubayd. Ibn al-Mundhir said: This is also my opinion, and that of some of the Maalikis, but some of them said: It is haraam. Ibn al-Mundhir narrated another report from al-Hasan in which he said that divorcing a pregnant woman is makrooh. End quote.
Ibn al-Qayyim said in Tahdheeb al-Sunan:
The words “then divorce her when she is pure (i.e., not menstruating) or is pregnant” indicate that divorcing a pregnant woman is in accordance with the Sunnah.
We have quoted in the answer to question no. 12287 the fatwa of Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allaah have mercy on him) on the ruling on divorcing a pregnant woman.