Praise be to Allah.
We ask Allah, may He be exalted, to heal the sick Muslims and grant them healing which leaves no sickness behind.
There is nothing wrong with using morphine to relieve the patient’s pain, so long as no other painkiller is available. This is permissible because of necessity.
The scholars of the Permanent Committee for Ifta’ were asked:
What is the ruling on using pethidine or morphine – which are medicines that have an intoxicating effect – in cases of necessity or when needed?
They replied: If no other, permissible substance is known that could be used to alleviate the patient’s pain except these two substances, then it is permissible to use either of them to alleviate pain in the case of necessity. This applies so long as no greater or equal harm will result from using them, such as addiction.
Shaykh ‘Abd al-‘Aziz ibn Baz, Shaykh ‘Abd ar-Razzaq ‘Afifi, Shaykh ‘Abdullah ibn Ghadyan, Shaykh ‘Abdullah ibn Qa ‘ud."(Fatawa al-Lajnah ad-Da’imah 25/75-77).
During the conference “The Eighth Medical Jurisprudence Symposium: An Islamic View on Some Health Problems and Impure and Haram Substances in Nutrition and Medicine”– which was held in Kuwait, 22-24 Dhu’l-Qa‘dah 1415 AH/ 22-24 May 1995 CE, the following was stated:
Intoxicating substances are prohibited and it is not permissible to take them except for the purpose of unavoidable medical treatment, and in the amounts specified by doctors, and they are regarded as pure (tahir). End quote.
See also question no. 176623 .
And Allah knows best.