All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Zina (fornication or adultery) is one of the grave major sins and Allaah warned us against it as He Says (what means): {And do not approach unlawful sexual intercourse. Indeed, it is ever an immorality and is evil as a way.}[Quran 17:32] For more benefit on Zina and its dangers, please refer to Fataawa 85425 and 85254. Therefore, both of you are obliged to repent from it; for more benefit, please refer to Fatwa 86527.
You are also obliged to repent for ordering that woman to abort her child as this is helping her in evil. Abortion is forbidden especially if it takes place after the soul is breathed into the fetus; for more benefit, please refer to Fatwa 102388.
However, if this woman had really aborted the child, then she is obliged to repent from it. If this happened after the fetus took human form (40 days after pregnancy), then a Diyah (blood money) must be paid – which is one-tenth of the Diyah of the mother – that must be paid by the one who carried out the abortion and he/she does not inherit anything from the Diyah if he/she is an heir.
As regards that child, if the situation is as you mentioned that she gave birth to him one month and some days after you married her, then he should not be traced back to you; rather, he should be traced back to his mother as we clarified in Fatwa 84788.
The jurists differed in opinion in regard to a pregnant woman from Zina, and the Maaliki and Hanbali Schools of jurisprudence said: “It is not permissible to marry her before giving birth to the child – whether this is by the man who committed Zina with her or by any other man, as the Prophet said: “One should not have sexual intercourse with a pregnant woman until she gives birth to the child.” [Abu Daawood and Al-Haakim] Besides, Sa’eed Ibn Al-Musayyib reported that a man married a woman and when he had sexual intercourse with her, he found her pregnant, so he took the case to the Prophet and the Prophet separated them from each other.
On the other hand, the Shaafi’i and Hanafi School of jurisprudence are of the view that it is permissible to marry a woman who is pregnant from Zina because the sperm from an act of Zina has no sanctity. The evidence is that the family lineage is not confirmed with it as the Prophet said: “The boy is for (i.e. traced back to) the owner of the bed (legitimate husband) and the stone is for the person who commits an illegal sexual intercourse (i.e. the child will not be traced back to him)." [Al-Bukhari and Muslim]
However, if a man other than the one who committed Zina with the woman marries her, then it is not permissible for him to have sexual intercourse with her until she delivers the baby for the Hadeeth "One should not have sexual intercourse with a pregnant woman until she gives birth to the child.” And for the saying of the Prophet said: “It is not allowed for a man who believes in Allaah and the Last Day, to have an intercourse with a woman who is pregnant from another man.” [At-Tirmithi] However, if the man who committed Zina with her marries her, then he may have sexual intercourse with her.
Therefore, based on this opinion – which is the second opinion – the marriage which you mentioned in the question is valid if it took place with the consent of the woman’s guardian and the presence of two witnesses.
Finally, it should be noted that it is not permissible for a Muslim to establish an affectionate relationship with a non-Mahram woman as we clarified in Fatwa 81356, and that it is not permissible for a Muslim to stay in a place where an evil is being committed except with a sound reason, like forbidding evil, as Allaah Says (what means): {And when you see those who engage in [offensive] discourse concerning Our verses, then turn away from them until they enter into another conversation. And if Satan should cause you to forget, then do not remain after the reminder with the wrongdoing people.}[Quran 6:68]
Allaah Knows best.