All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Fertilizing an egg of a woman with the sperm of a man other than her husband and then implant it in the womb of his wife is undoubtedly impermissible.
Rather, this is included in the definition of Zina (fornication and/or adultery) – we seek refuge in Allah from this. The Islamic Fiqh Council issued a collective decision (after research and discussion) which stated that this way of fertilization is prohibited.
For more benefit, please refer to Fataawa 90034, 87132, and 84882.
Allah knows best.