In the first place, we would like to stress that in vitro fertilization is permissible as long as the semen and ovum are from a husband and wife who are legally married and the fertilization takes place during their marriage, not after divorce or the death of the husband.
To introduce an egg or sperm from a third person to the equation is akin to sharing the marriage bed with someone else. It is therefore no different from zina (adultery) in Islam. Thus, it is prohibited in Islam to take a donated egg of a third person rather than the husband and wife and to use the husband’s sperm for fertilization purpose.
Elaborating more on the issue of using donated egg or sperm for fertilization purpose, we’d like to furnish you with the following fatwa issued by Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, who states:
“IVF is permissible in Islam only on condition that both sperm and egg involved in the process originate from a man and a woman who are married to each other. To introduce an egg or sperm from a third person to the equation is akin to sharing the marriage bed with someone else. It is therefore considered no different from zina (adultery) in Islam. A child born through such a procedure is born of zina in Islam.
Since it is undoubtedly reprehensible and utterly sinful, no Muslim should ever entertain such a possibility for conceiving a child. A Muslim should accept what Allah has chosen for him or her. To accept Allah as a Sovereign Lord and Creator means to believe in His will and ultimate wisdom. Allah says: “To Allah belongs the Sovereignty of the heavens and the earth. He creates whatever He wills. He grants daughters to whom He wills, and sons to whom He wills; or He gives both sons and daughters to whom He wills and makes barren whom He wills. Indeed He is Knowing, Able” (Ash-Shura 42: 49-50).