No, mercy killing, or euthanasia, is generally considered Haram (unlawful) in Islam.
Islamic teachings emphasize the sanctity of life, which is a gift from Allah (God). Only Allah has the right to give and take life. Deliberately ending a person's life, even out of compassion or to relieve suffering, is seen as an act of transgression against Allah's will.
Islamic jurisprudence does not recognize mercy killing as a permissible act. The principle is that even if a person is suffering greatly, they should be cared for and given palliative care to alleviate their pain. Taking a life, even with good intentions, is not allowed. The reference clearly states that killing an ill person out of mercy is not considered a lawful act and is therefore unlawful.
While there are differing opinions on end-of-life care, particularly regarding the withdrawal of artificial life support in cases of irreversible coma or brain death, active euthanasia, where a person actively causes the death of another, is widely condemned. The focus is on providing comfort and care while respecting the natural course of life and death ordained by Allah.