His parents had exhausted all means to continue the care that kept their son alive.
12-year-old Archie, brain dead in the UK, died on Saturday.
Read alsoUnited Kingdom: Archie, 12, brain dead, at the center of a conflict between his family and justice
Archie Battersbee had been kept in a coma in a London hospital since April.
He was considered brain dead by doctors and British justice had authorized the hospital in mid-July to end treatment.
His parents, Hollie Dance and Paul Battersbee, had to resolve to let their son die after having exhausted all legal remedies, in the United Kingdom and before the European Court of Human Rights (ECHR).
They fought so that their son could leave the Royal London Hospital in Whitechapel, east London, and be transferred to a hospice for the withdrawal of care.
"Taking into account the wishes of the family and their motivations, the equipment in the care home, what Archie would have wanted, the risks of a transfer and his increasingly fragile health, (...) I think that it is in his interest to stay in the hospital for the cessation of treatment, “said the judge at the High Court in London on Friday.
“We refuse to give it up”
The hospital considered that he was too unstable for a transfer, which could "very likely accelerate the deterioration feared by the parents".
The parents filed a request for appeal, but it was denied on Friday evening.
A request in this regard was also rejected by the ECHR.
"All the family's wishes have been denied by the authorities," Archie's mother reacted after the trial judgment.
"We are broken, but we will carry on because we love Archie and we refuse to give up on him."
Archie was found unconscious at his home on April 7 and has not regained consciousness since.
According to his mother, he participated in a social media challenge to hold his breath until he passed out.
His parents claim to have observed signs of life but for the medical profession, his case is hopeless, justifying the cessation of treatment.
"His body, his organs and his heart are dying out," Judge Andrew McFarlane, sitting on the appeals court, said on Monday.