There are many views among Buddhists on the issue of euthanasia, but many are critical of the procedure.
An important value of Buddhism teaching is compassion. Compassion is used by some Buddhists as a justification for euthanasia because the person suffering is relieved of pain. Keyword is intention (cetana). However, it is still immoral "to embark on any course of action whose aim is to destroy human life, irrespective of the quality of the individual's motive."
For bhikkhus the rules are explicitly spelled out.
The monastic code (Patimokkha) states:
"Should any bhikkhu intentionally deprive a human being of life,
or search for an assassin for him, or praise the advantages of death,
or incite him to die (thus): 'My good man, what use is this wretched,
miserable life to you? Death would be better for you than life,' or
with such an idea in mind, such a purpose in mind, should in various
ways praise the advantages of death or incite him to die, he also is
defeated and no longer in communion."
On the other side, there are the Vakkali Sutta and the Channa Sutta.
a) In the Vakkali Sutta (SN 22.87), the monk Vakkali, who is "sick, afflicted, gravely ill," tells other monks of his intention to use a knife to commit suicide. Upon learning of Vakkali's intention, the Buddha personally visits Vakkali to speak with him. In the course of their discussion, it becomes apparent that Vakkali is well progressed on the path to enlightenment—having already gained direct and genuine insight into the impermanent, self-less, and ultimately unsatisfactory nature of existence. After the Buddha parts company with Vakkali, he goes to the nearby Mount Vulture Peak to dwell for the rest of the day and night, and that night he is visited by "two devatas of stunning beauty" who remark to him that Vakkali is "intent on deliverance" and that "he will be liberated as one well liberated." The next day the Buddha has monks deliver a message to Vakkali recounting the devatas' auspicious visit and assuring Vakkali that his death will be a good one: "Do not be afraid, Vakkali, do not be afraid! Your death will not be a bad one. Your demise will not be a bad one." After Vakkali receives this message from the Buddha, he "uses the knife," as planned, and kills himself.
Upon receiving word of Vakkali's suicide, the Buddha leads a group of monks to the Black Rock on the Isigili Slope, where Vakkali's corpse can be seen:
"Then the Blessed One, together with a number of bhikkhus, went to the Black Rock on the Isigili Slope. The Blessed One saw in the distance the Venerable Vakkali lying on the bed with his shoulder turned. Now on that occasion a cloud of smoke, a swirl of darkness, was moving to the east, then to the west, to the north, to the south, upwards, downwards, and to the intermediate quarters. The Blessed One then addressed the bhikkhus thus: 'Do you see, bhikkhus, that cloud of smoke, that swirl of darkness, moving to the east, then to the west, to the north, to the south, upwards, downwards, and to the intermediate quarters?' 'Yes, venerable sir.' 'That, bhikkhus, is Mara the Evil One searching for the consciousness of the clansman Vakkali, wondering: 'Where now has the consciousness of the clansman Vakkali been established?' However, bhikkhus, with consciousness unestablished, the clansman Vakkali has attained final Nibbāna.'"
b) In the Channa Sutta (SN 35.87) the monk Channa, who is suffering intensely due to sickness, tells the monks Sariputta and Mahacunda that his condition is worsening and that he intends to kill himself using a knife:
"Friend Sariputta, I am not bearing up, I am not getting better. Strong painful feelings are increasing in me, not subsiding, and their increase, not their subsiding, is to be discerned. Just as if a strong man were to split my head open with a sharp sword, so too violent winds cut through my head. I am not bearing up… Just as if a strong man were to tighten a tough leather strap around my head as a headband, so too there are violent pains in my head. I am not bearing up....Just as if a skilled butcher or his apprentice were to carve up an ox's belly with a sharp butcher's knife, so too violent winds are carving up my belly. I am not bearing up....Just as if two strong men were to seize a weaker man by both arms and roast him over a pit of hot coals, so too there is a violent burning in my body. I am not bearing up, I am not getting better. Strong painful feelings are increasing in me, not subsiding, and their increase, not their subsiding, is to be discerned."
Sariputta and Mahacunda exhort Channa not to kill himself but he decides to do so anyway, asserting that he has led a “blameless” life. Sariputta, believing that Channa may have broken precepts of the Patimokkha by having inappropriately close relationships with laity—and assuming that Channa would not attain Nibbana upon death as a result—approaches the Buddha to inquire about the nature of Channa's rebirth. The Buddha replies that Channa has done nothing wrong and that he has, in fact, attained freedom from the round of birth and death:
"The Venerable Channa did indeed have these friendly families, Sariputta, intimate families, hospitable families; but I do not say that to this extent one is blameworthy. Sariputta, when one lays down this body and takes up another body, then I say one is blameworthy. This did not happen in the case of the bhikkhu Channa. The bhikkhu Channa used the knife blamelessly. Thus, Sariputta, should you remember it."
It is noteworthy that Channa’s suicide appears to be something of a non-issue in his case, and we may reasonably conclude from this sutta that suicide—when carried out to avoid unbearable physical pain associated with terminal illness—was considered, by the Buddha himself, to be an acceptable course of action."