Answer
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- It is prohibited to terminate the pregnancy after 120 days regardless of the reason except when the doctors confirm that the pregnancy may take the life of the mother.
2- Terminating the fetus before 120 days is permissible according to some or most Hanbali scholars with a reason or without.
3- Maliki scholars view that terminating the pregnancy at its inception of pregnancy is not permissible.
Answering your question about aborting an AIDS infected fetus, Dr. Ali Suleiman Ali, PhD in Islamic Studies and a co-founder, Core Scholar, and member of the Board of Trustees of the American Learning Institute for Muslims (ALIM), states:
Sacredness of Human Life in Islam
The sacredness of human life has been vividly well established in the Quran, Hadith and ijma (consensus). Allah the Almighty says:
{… whoever kills a soul unless for a soul or for corruption [done] in the land – it is as if he had slain mankind entirely…} (Al-Ma’idah 5:32)
Allah considers killing one innocent soul is like killing the whole humanity.
Our Prophet Muhammad (peace be upon him) counted killing innocent soul as one of the major sins.
Cases of Abortion
Muslim scholars unanimously agreed that aborting an embryo after (not before) 120 days of pregnancy is forbidden and a crime. The only exception is when the life of the mother is in danger to the extent that she may die.
However, terminating the embryo before 120 days is permissible according to some or most Hanbali school of fiqh with a reason or without.
The majority of Maliki school of fiqh and Imam Al-Ghazali, some Hanif scholars as well as some Shafi`i hold that terminating the pregnancy at its inception of pregnancy is not permissible.
The Hanbali scholars and those who agreed with them based their opinion on the Hadith of Ibn Masud which reads:
“The creation of you (humans) is gathered in the form of semen in the womb of your mother for forty days, then it becomes a clinging thing in similar (period), then it becomes a lump of flesh like that, then Allah sends an angel who breathes the life into it; and (the angel) is commanded to record four things about it: Its provision, its term of life (in this world), its conduct; and whether it will be happy or miserable. By the One besides Whom there is no true god! Verily, one of you would perform the actions of the dwellers of Jannah until there is only one cubit between him and it (Jannah), when what is foreordained would come to pass and he would perform the actions of the inmates of Hell until he enter it. And one of you would perform the actions of the inmates of Hell, until there is only one cubit between him and Hell. Then he would perform the acts of the dwellers of Jannah until he would enter it.” (Al- Bukhari and Muslim)
The Maliki scholars and Imam Al-Ghazali and whoever holds the same opinion based their opinion on the fact that the sperm is a potential human being and no one has right to prevent any soul from coming to this world.
Some contemporary scholars quoted the hadith in Sahih Muslim which indicates the formation of human is gathered in his mother womb in 40 days
The Ruling on Aborting an AIDS infected fetus
Islamically speaking, it is prohibited to terminate the pregnancy regardless of the reason except when the doctors confirm that the pregnancy may take the life of the mother.
Before 120 days, I agree with the opinion of majority of Maliki school and Al-Ghazali but I don’t criminalize whoever aborts the fetus before 120 days.
Almighty Allah knows best.