Is Testicle Transplant Allowed in Islam?
Question

What is the ruling on transplanting testicles taken from a person who has recently died, especially when this could be the solution for a person who is suffering from sterility?
Praise be to Allah.The Islamic Fiqh Council answered this question as follows:

Transplanting reproductive glands. Because the testicles and ovaries continue to carry and produce the genetic characteristics (DNA) of the original donor even after being transplanted into a new body, the transplanting of reproductive glands is not permitted according to Islamic Shari`ah.
Transplanting other parts of the reproductive organs. Transplanting parts of the reproductive system which do not transmit DNA (with the exception of the private parts themselves) is permissible in cases of legitimate necessity as long as the relevant rulings and regulations of Shari`ah are adhered to.

For more details, please see the following answers: 2141, 2159, 129161, 107690, 131313.
And Allah knows best.