Slaughtering the mother of a fetus is equivalent to slaughtering the fetus itself
The fetus (janin) refers to the child that is in the mother’s womb.
[Al-Munjid: p. 126]
It is narrated from Jabir bin Abdullah (may Allah be pleased with him) that the Messenger of Allah ﷺ said:
ذكاة الجنين ذكاة أمه
“By the slaughter of the mother, the child in her belly is slaughtered by itself.”
[Sahih: Sahih Abi Dawud: 2452, Kitab al-Dahaya: Bab ma ja’a fi zakat al-janin, Abu Dawud: 2828, Ibn Majah: 3199, Tirmidhi: 1476, Daraqutni: 273/4, Ahmad: 31/3, Ibn Hibban: 1077 – al-Mawarid, Sharh al-Sunnah: 228/11, Irwa al-Ghalil: 2539, 172/8]
(Shafi’i, Muhammad, Abu Yusuf (may Allah have mercy on them)) The child in the belly is not to be slaughtered again.
(Abu Hanifa (may Allah have mercy on him)) If the child in the belly comes out alive, it can be eaten only after being slaughtered anew; otherwise it cannot be eaten.
[Nayl al-Awtar: 223/5, Subul al-Salam: 1855/4]
(Preferred view) The position of Imam Shafi’i (may Allah have mercy on him) and others is correct, because it is closest to the hadith. Furthermore, this hadith apparently seems to contradict the principle تــحــريــم الميتة, that is, the prohibition of carrion. However, the One who made carrion forbidden is the very One who has made the fetus an exception, like the fish and the locust, and in reality it is not carrion at all but a part of its mother’s body, and it is not necessary to slaughter every part.
[For further detail see: I’lam al-Muwaqqi’in: 353/2, Subul al-Salam: 1856/4]