Shaykh Bin Baz rahimahullah was asked:

Question:

What is the ruling on transplanting organs after brain death?

Answer:

“A Muslim should be respected whether alive or dead. It is an obligation
not to harm or disfigure a deceased by, for instance, breaking or cutting their bones. A Hadith is reported to the effect that:  Breaking a deceased person’s bone is akin to breaking it when alive. This constitutes evidence of the impermissibility of mutilating the dead in favor of the interests of the living, such as taking their heart or kidney, for this is more heinous than breaking their bones.
However, scholars disagreed over the permissibility of organ donation. Some say that this benefits the living due to the increased number of kidney failures; but this is disputable. The opinion that I consider more correct, based on the above-mentioned Hadith, is that it is not permissible to do this because this entails manipulation and abuse of the organs of the dead. Moreover, the heirs who are entitled to the property of the dead person rather than to his body may be dazzled by money. Thus, they will pay no heed to the sanctity of the dead. May Allah grant us success”.

[Reference]

Shaikh ibn Uthaymeen’s view:

“this issue, as the questioner mentioned, has occurred lately in the latter times, and the people of knowledge differed on it. So from them are those who permitted donating one of the limbs which remains from him, then those scholars differed is it allowed to donate it only or sell it? From the people of knowledge are those who prohibited that absolutely, they said, ‘it is not permitted for anyone to donate or sell anything from his limbs, even if he despairs of his life. That is because his body is a trust with him, [and] it is not allowed to transfer it. So, the person is the slave and not the King/Owner and so if he is not the owner of anything of his limbs, and verily it is only a trust for him, then it is not allowed for him to transfer it by selling it or not otherwise and donating a limb from his body’…so what is preferred with me is that it is not allowed for anyone to donate anything from his limbs and if it is not allowed to donate it then selling it is more so (prohibited)”…

[Reference]

And he [Shaykh Ibn Uthaymeen]also said rahimahullah:

“It is not allowed not before death or after death even if the deceased gives a testimony/will and says,’if I die, give my relative so and so my eye or my kidney to so and so or my liver to so and so and what resembles that.’ It is not allowed to fulfill this will because it is a prohibited will. It is not fulfilled. The People of Knowledge mentioned that. Return to the book al-Iqnaa’ in Hanabli fiqh in the book of Janaaiz chapter ‘washing the deceased’. You will find completely the text, ‘it is not allowed to take something from the limbs of the deceased even if he wills it’ and they use as evidence the statement of the Prophet (ﷺ) :

كسر عظم الميت ككسره حياً

Breaking a dead man’s bone is like breaking it when he is alive.

[Saheeh Sunan Abi Dawood no.3207]

So how is that allowed?

You are not free regarding yourself [i.e. to treat your body however you wish]. Allah says to you:

وَلا تَقْتُلُوا أَنْفُسَكُمْ إِنَّ اللَّهَ كَانَ بِكُمْ رَحِيماً

And do not kill yourselves (nor kill one another). Surely, Allah is Most Merciful to you

[4:29]

Killing yourself does not mean a person takes a knife and slaughters himself. No. Everything that causes harm is from killing yourself…”

[Liqaa Bab al-Maftooh no. 173]

Shaikh al-Albani rahimahullah has held the opinion that it is prohibited in al-Mutafariqah no. 86 found here.

Shaikh Muqbil ibn Hadi al-Waadi’ee rahimahullah said :

“this affair needs investigation, barakallahu feekum, and what I advise every brother is not to do so. That which Allah prescribed for him to is to use the Legislated cure, and what Allah prescribed will occur, Nor can a soul die except by Allah’s permission at a decree prescribed

[3:145]

The issue of prohibition and other than it is ceased in this, Jazakallahu Khairan”

Questioner:

that is, he moves away from it?

Shaikh:

Yes, which is what we advice.

Question:

and that cures?

Shaikh:

and that cures Allahu Must’aan.

[taken from here]

And Allah Knows Best

Translated by

Faisal Ibn Abfdul Qaadir Ibn Hassan
Abu Sulaymaan