Is Medical Marijuana Prohibited in Islam?
Question

I have muscular atrophy and suffer from spasms and extreme pain in my muscles; even barbiturates do not help with this pain. Hence the doctor has advised me to use marijuana, because it is very helpful for patients in cases like mine. There is also a pharmaceutical medicine that can be used instead of marijuana, but it has bad side effects. What is the Islamic viewpoint? Is it permissible to use marijuana in this case?
Praise be to Allah.Patience and Reliance on Allah during Illness
We ask Allah, may He be Exalted, to grant you healing and well-being, and we ask Him to grant you both reward and a speedy recovery. We advise you to be patient and seek reward with Allah, for the believer is patient at times of hardship and grateful at times of ease. No doubt you know that Allah, may He be Exalted, is most Wise in what He decrees for His creation of tests and trials, so seek the help of Allah your Lord, may He be Exalted, to relieve you of hardship, and ask Him to make you patient and help you to obey Him and worship Him properly.
What is Marijuana and Its Harmful Effects?
Marijuana is a drug derived from the cannabis plant. It is also sometimes called hashish or grass. With regard to the difference between these words, hashish refers to the sticky substance or resin, which is obtained from the tops of the cannabis plants.
Regarding the effects of this drug, it says in Al-Mawsu`ah Al-`Arabiyyah Al-`Alamiyyah: Marijuana contains more than four hundred chemical substances, and when it is smoked it produces more than two thousand chemical substances which enter the body through the lungs. These chemical substances have a number of immediate, short-term effects, in addition to the fact that regular use is connected to a number of long-term effects. (End quote)
On our website we have previously stated that it is prohibited to use this drug, and we have explained its harmful effects in the answer to question no. 66227.
Conditions for Using Medical Marijuana in Islam
With regard to the ruling on using marijuana or other drugs to relieve pain, this is permissible subject to certain conditions:

That the patient’s need for this drug has reached the level of necessity.
That a trustworthy doctor testifies that the drug will be beneficial and helpful for the patient.
That the use of the drug is limited to the level dictated by necessity.
That the use of this drug is indicated in the sense that there is no other permissible or less-prohibited medicine that could be used instead.
That this drug will not cause the patient any harm that is greater than or equal to the harm for which it is being used; one of the greatest harms to the patient is addiction to using the drug. (Ahkam Al-Adwiyah fi Ash-Shari`ah Al-Islamiyyah, by Dr. Hasan Al-Fakki, p. 276), from which we have quoted these conditions in brief. There is much more information in the book on this topic for one who wants to know more.

The scholars of the Permanent Committee were asked:
What is the ruling on using pethidine or morphine, which are medicines that have an intoxicant effect, in cases of necessity or need?
They replied:
If no other, permissible substances are known that could reduce the patient’s pain apart from these two substances, then it is permissible to use either of them to ease pain in cases of necessity, so long as using them will not result in any greater or equal harm, such as addiction to their use. Shaykh `Abd Al-`Aziz ibn Baz, Shaykh `Abd Ar-Razzaq `Afifi, Shaykh `Abdullah ibn Ghadyan, Shaykh `Abdullah ibn Qa`ud. (End quote from Fatawa Al-Lajnah Ad-Da`imah, 25/77-78)
During the eighth conference of the Medical Fiqh Council on the Islamic View on Certain Medical Problems: Prohibited and Impure Substances in Food and Medicines – which was held in Kuwait, 22-24 Dhul-Hijjah 1415 AH/22-24 May 1995 CE – it was stated:
Intoxicant substances (drugs) are prohibited and it is not permissible to take them except for the purpose of specific medical treatment, in the amounts prescribed by doctors, and provided that they are pure. (End quote)
For more details, please see the following answers: 299989,  21718, 215281, 192321, 289422.
And Allah knows best.