Doctors said Oshin Kiszko should undergo chemotherapy and radiotherapy to treat his malignant brain tumour.
But his parents, Angela Kiszko and Adrian Strachan, refused treatment because of the severe side effects.
After a court decided in March that Oshin had to receive chemotherapy, a judge in September ruled he could be given palliative care.
The Perth boy died early on Wednesday morning, his mother confirmed to local media.
"My love Oshin took his last breaths peacefully as I lay cuddling him at 2am," Ms Kiszko told Seven News.
"Oshin's journey has been extraordinarily traumatising for him and I am grateful he no longer needs to suffer through this nightmare."
The legal fight began after Oshin underwent brain surgery at Perth's Princess Margaret Hospital in December 2015.
Doctors recommended follow-up chemotherapy and radiotherapy, but Oshin's parents believed the side effects would ruin his quality of life.
"I thought I could not put myself through it. Why could I put my son through it?" Ms Kiszko told Nine's 60 Minutes programme in April.
Doctors took the matter to the West Australian Family Court, which ruled in March that Oshin must undergo chemotherapy.
At a hearing in May, the court heard evidence that the boy would have at least a 30% chance of survival if he received both chemotherapy and radiotherapy.
The matter was adjourned when Ms Kiszko and Mr Strachan committed to continuing chemotherapy only.
In September, a judge ruled Oshin's cancer was so advanced he could be given palliative care.
A court statement at the time said "specialist medical opinion confirmed that the delay in therapy had substantially reduced Oshin's chances of a cure, which are now remote".
A six-year-old boy whose cancer diagnosis sparked a high-profile legal battle in Australia has died.