Carol Glass told a judge in the High Court in London that Portsmouth Hospitals NHS Trust had unlawfully acted against her wishes by giving her 12-year-old son, David, only the painkiller diamorphine, which could hasten his death.
She said the drug would adversely affect his respiratory system but the trust said it was necessary to balance the child's distress against that risk.
Ms Glass, from Portsmouth, wants a legal guarantee that if her son's condition deteriorates again, he will be entitled to life-saving treatment.
He was diagnosed with hydrocephalus at birth and suffers from blindness, spastic quadriplegia and severe learning difficulties. He is now back home with his family.
The court heard that the argument over his treatment last October ended in a violent fracas at the hospital. Doctors and police were injured after 15 members of the boy's family entered the children's ward. A paediatrician who witnessed the dispute said efforts to resuscitate David on that occasion "prevented him from dying".
Richard Gordon QC, for Ms Glass, told Mr Justice Scott Baker that clinicians at the trust had decided last July that it was in the child's best interests not to take active steps to keep him alive.
"The thrust of that view was that any life-saving treatment should be withheld and [the boy] should be allowed to die," he said. "That was against a background of the clearest of disagreements between the mother and the clinicians as to whether he should be allowed to die."
Last October, David became seriously ill and was taken to hospital. A consultant paediatrician treating the child described in an affidavit read to the court how the atmosphere was "extremely fraught" as the boy, he asserted, lay dying.
The doctor said that in normal circumstances hospital staff would have recommended the family hold their child and calm him while he was allowed to die peacefully.
But female members of the family started "blowing raspberries in his ears, banging his chest and rubbing his arms and legs very vigorously despite being asked not to".
The paediatrician said: "In my own view this was extremely cruel. [The child] should have been allowed to pass away peacefully and with dignity."
Mr Gordon said Ms Glass was not challenging the right of the doctors to make clinical judgement but sought to ensure that if events like those of last October happened again, the boy would be treated in hospital.
The case continues.