The disgraced ice addict who bashed his 22-month-old stepson within an inch of his life received a taste of his own medicine in a prison attack.

William Andrew O'Sullivan was sentenced to nine-years imprisonment for the death of Mason Jet Lee in the Queensland Supreme Court, last week.

O'Sullivan's lawyer told the court that he fell victim to aggressive threats while in jail awaiting the outcome of his trial.

Ice addict, William Andrew O'Sullivan (pictured), who bashed his 22-month-old stepson within an inch of his life has received a taste of his own medicine in a prison attack

The self-described 'junkie' (pictured) was bashed by two inmates in vicious attack where his head was stomped and kicked in. He spent 13 days in hospital for fractured skull

O'Sullivan was sentenced to nine-years imprisonment for the 2016 death of Mason Jet Lee (pictured) in the Brisbane Supreme Court, last week

The self-described 'junkie' was bashed by two inmates in vicious attack where his head was stomped and kicked in.

He suffered a severely fractured skull and spent 13 days in hospital recovering.

O'Sullivan failed to assist the dying toddler in his last days, instead yelling at him to 'shut up' when he cried as well as hitting and kicking him, The Courier Mail reported.

Mason was found with extensive injuries at O'Sullivan's home in Caboolture, north of Brisbane, in June 2016.

The young boy was so severely beaten he suffered anal injuries, a broken leg and a ruptured intestine, spending the last of his days vomiting, feverish and dehydrated.

Mason, who was subjected to neglect and mistreatment in his short life, spent his final hours with blue lips, wrapped in a towel and making grunting noises.

In addition to the injuries, traces of methamphetamine were found in his blood.

In the months before his death, Mason was treated for multiple injuries and was admitted to Lady Cilento Children's Hospital for three weeks in February 2016, a court was previously told.

O'Sullivan (pictured) frequently wiped away tears during his court appearance last week

O'Sullivan failed to assist the dying toddler (pictured) in his last days, instead yelling at him to 'shut up' when he cried as well as hitting and kicking him

O'Sullivan tried to blame Mason's death on paramedics for responding slowly, despite arriving at the property six minutes after they were called by a friend.

He also claimed his 12-year-old 'serial killer' daughter could have beaten the toddler.

O'Sullivan frequently wiped away tears during his court appearance and took plenty of deep breaths.

O'Sullivan pleaded guilty to four separate charges before the Queensland Supreme Court, including manslaughter and cruelty to a child under 16-years-old.

He sentenced to nine years imprisonment and will be eligible for parole in less than four years.

The sentence has been slammed by child protection advocates for being inadequate and too lenient.

There are calls for the judgement to be reviewed by the Attorney-General.

Mason was so severely beaten he suffered anal injuries, a broken leg and a ruptured intestine, spending the last of his days vomiting, feverish and dehydrated