Donating an organ to another, while a noble expression of kindness, is a complicated affair in Jewish law. Donations between living persons are generally permitted, as long as the recipient is ready to receive the organ right away (which excludes organ banks), and the donor does not sacrifice or jeopardize his own life and well-being in the process.

The halachic problems begin when the donor is on the verge of death or has already passed on, as many organs cannot be transplanted once the donor's death occurs. Jewish law prohibits tampering with a person who is in the throes of death, or doing anything that may cause or hasten his or her demise. In such a case, touching the person or even merely removing a pillow is forbidden.

Concerning post-mortem organ transplants, one has to contend with Biblical prohibitions such as Nivul Hamet — mutilating the body of the deceased; Halanat Hamet — delaying the burial of a body; and Hana'at Hamet — deriving any benefit from a dead body, including selling or donating it for research.

A third state is someone who is kept alive artificially and whose brain-stem is considered clinically dead. In this case, one apparently does not have to contend with the issues of hastening death or tampering with the dead. The person seems to be suspended between life and death as long as the machines are connected.

Indeed, contemporary rabbinic authorities differentiate between when a person is "officially dead" and when a person is in the "throes of death." Some rabbis hold that brain-stem death is considered "official death" and one may thus operate to remove the necessary organs for transplantation once that state has been established (but not before). Regarding prohibitions against delaying burial and so on, these rabbis cite the ruling that saving a life overrides most Torah prohibitions.

Other rabbis disagree strongly and state that one is alive for all purposes "until the breath of life has ceased from his lips." Therefore, it is forbidden to tamper with the body at all. In their view, any type of mutilation is unforgivable and interferes with the eternal rest and peace of the soul.

As you can see, donating organs is not a simple matter. In all of these matters, one should seek the guidance of a competent rabbi who specializes in this area of Jewish law, before leaving any unalterable directives.