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, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
First of all, we blame you for delaying to ask about this matter for six years, particularly that it involves some serious matters. You also have not mentioned anything about what happened later or whether this woman is still your wife or not, or whether she repented and became righteous or not. In any case, we will deal with your issue from several aspects:
First: Your wife
If she was proved to have let your friend in your house in your absence, she had committed evil by allowing a non-Mahram man to enter upon her and be in seclusion with her and by allowing a man whom her husband did not permit to enter his house to enter it. It is the husband's right on his wife that she preserves what she is ordered to preserve during his absence and does not allow anyone whom her husband dislikes to enter his house. The Prophet, sallallaahu ‘alayhi wa sallam, said: "Your right upon them is that they do not permit anyone whom you dislike to enter your home." [Muslim] She is also sinful by having an abortion, which becomes more of a sin if the abortion was carried out after the soul has been breathed into the fetus. She has also behaved wrongfully when she bid farewell to your friend in a manner that contradicts modesty and politeness.
Second: Your friend
If what you have mentioned is true that he visited your house during your absence, he had committed an evil act and a manifest sin. Indeed, a man like this is not worthy of being a friend.
Third: You
If the abortion was done with your knowledge and consent, you have participated in the sin and you have to repent. Please see Fatwa 86527. Moreover, you knew that your friend visited your house in your absence and that your wife let him in; nonetheless, you did not say anything to show your jealousy for your honor. On the contrary, your wife asked you to invite him to dinner and you accepted, although a man like this should be deserted until he repents to Allaah The Almighty.
As regards what your wife has done, it is considered disobedience for which she deserves to be treated as a disobedient wife. Allaah The Almighty showed us how to deal with the disobedient wife, and we have clarified that in Fatwa 85402.
Finally, we draw your attention to the fact that if the abortion was done after the fetus has taken form, the one who did it has to pay blood money which equals tenth of the blood money allocated for its mother, i.e. five camels as clarified in Fatwa 85558.
We also warn you against negligence in the issue of allowing non-Mahram men to enter upon women or the so-called family gatherings which usually involve many violations of Sharee‘ah rules. For further benefit, see Fatwa 92070.