Q: Is it permissible to perform artificial insemination between husband and wife during Ramadan? In particular, the act the man has to perform is not for pleasure so is this allowed?
A: All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad sallallaahu `alayhi wa sallam ( may Allaah exalt his mention ) is His slave and Messenger.
If the artificial insemination leads to masturbation during the daytime of Ramadan, then this is one of the matters that invalidate fasting. Also, carrying out an artificial insemination on a woman while she is fasting invalidates her fast because the womb is like the stomach and once an object reaches it, the fasting is invalidated.
Moreover, it is not permissible for a fasting person to break his fast during the daytime of Ramadan without a sound reason and breaking the fast in Ramadan is one of the great major sins. Therefore, it is not permissible to carry out this operation during the daytime of Ramadan, and willing to have children is only a need and it does not reach the dire necessity that makes committing a forbidden matter permissible, as stated by some scholars may Allaah have mercy upon them. Furthermore, this operation can be carried out at a time other than the time of fasting.
Finally, if you and your husband reside in a non-Muslim country as it appears from the details of the question, and you intend to undergo this operation in that country, then both of you should take all precautions while going through it by looking for a female or male doctor who are trustworthy because it is possible that the hospital or the doctor would misuse the sperm or the egg and being careless about this matter may lead to the mixing of family lineages and committing what is forbidden.