Scholars agree it is forbidden after the soul is breathed into the child (taught to be 120 days) unless the mother's life is in danger. Before that, they differ: some forbid it unless there is a real need, and others allow it for a valid reason before 40 days. The Quran forbids killing children (17:31, 6:151). Ask a scholar and a trusted doctor.
Скажи: «Придите, и я прочту то, что запретил вам ваш Господь». Никого не приобщайте к Нему в сотоварищи и делайте добро родителям. И не убивайте своих детей, опасаясь нищеты, ведь Мы обеспечиваем пропитанием вас вместе с ними. И не приближайтесь к мерзким поступкам, явным или сокрытым. Не убивайте душу, которую Аллах запретил убивать, если только у вас нет на это права. Это заповедал вам Аллах, - быть может, вы уразумеете.
This is general information, not a fatwa. For your own situation, ask a qualified scholar.
Questions about halal and haram
Is abortion permitted?
Scholars agree it is forbidden after the soul is breathed into the child (taught to be 120 days) unless the mother's life is in danger. Before that, they differ: some forbid it unless there is a real need, and others allow it for a valid reason before 40 days. The Quran forbids killing children (17:31, 6:151). Ask a scholar and a trusted doctor.