The high-profile case involved 71-year-old Erika Küllmer who slipped into a vegetative state after a cerebral haemorrhage in October 2002 and, confined to a nursing home, was fed through a tube for five years.
Although Küllmer had expressed the wish not to be kept alive under such circumstances, the home refused to let her die.
On the advice of her lawyer, Küllmer's daughter finally snipped the feeding tube with a pair of scissors in the presence of her brother and Küllmer died two days later of "natural causes," according to an autopsy.
A lower court acquitted the daughter of killing her mother because she had "mistakenly" followed her lawyer's advice. The son committed suicide a few months after the death of his mother.
The family attorney, Wolfgang Putz, was convicted and given a nine-month suspended sentence.
But the federal tribunal found that Putz, a prominent patients' rights advocate, had acted legally and in the patient's interest because she had clearly expressed her wish not to be kept alive artificially.
"An improvement in her health condition was not to be expected," the court said in a statement on the ruling.
"The expressed wish of the patient in September 2002, which her carers had approved and confirmed, was binding."
Chief Justice Ruth Rissing-van Saan had said when agreeing to hear the case that the court aimed to define the line between "killing" and "natural death."
The issue is particularly charged in Germany, where the Nazis cynically labelled a mass extermination programme for citizens deemed unfit to live "euthanasia."
Before the court, Putz had argued that Küllmer's life was no longer worth living in the eyes of her family.
Justice Minister Sabine Leutheusser-Schnarrenberger hailed the ruling as a victory for self-determination and dignity in death.
"There may not be forced medical treatment against a person's will," she said.
But patients' right organisations warned that Germans needed to be "crystal clear" in formulating their wishes.
"Only clearly formulated living wills can be respected," Sonja Hecker of the German Association for Provision and Care Rights advised, to spare dying patients and their loved ones battles in court.