It is narrated from Umar ibn al-Khattab that he said:
"O Messenger of Allah, I buried daughters alive during the Days of Ignorance."
The Prophet (peace and blessings be upon him) said:
"Free a slave for every daughter you buried alive."
This was because the Arabs in the Jahiliyyah (Age of Ignorance) used to dig a pit under the woman when labor pains struck her. As she gave birth, the child would fall into the pit.
If it was a male child, they would lift him out.
If it was a female child, they would leave her in the pit and cover her with soil until she died.
This was considered premeditated murder and required expiation (kafarah).
Ref:Al-Hawi Al-Kabeer. Fi Fiqh Madhab Al-Imam Shafi wa Huwa Sharh Mukhtasar AlMudhni. Vol13, Pg67