Judge Gibson said the police summary of facts "makes horrific reading''.
"This is a long, sad story of a litany of abuse on a young child at the hands of her mother.''
Shortly after the girl's birth she was removed from her mother's care by Child Youth and Family because of concerns about neglect and abuse.
The girl was sexually abused in CYF care and was returned to her mother in 2008.
Judge Gibson said the girl was slapped on her face and body after allegedly showing signs of "sexual behaviour'' towards her brother.
But the abuse got worse and in April last year the mother punched her daughter so hard that she broke bones in her own hand.
She also used weapons including a hammer, machete and steel pole to beat her daughter.
He said the abuse was not only physical but included the mother writing words on the girl including "skank'', "incest'' and "mental f***er''.
When police raided the mother's house in November last year, they found the girl dehydrated and starving. She had been hidden in a wardrobe in the hope police would not find her.
"This is one of the most appalling cases the courts have had to deal with.''
Crown prosecutor Lorraine McDonald said the girl still has scars on her body from the beatings.
"She is too embarrassed to explain to classmates how that was caused.''
She said a psychological report shows the girl still has flash backs.
Ms McDonald read a brief passage from the girl's victim impact statement where she referred to her parents. "They didn't give me a chance, they didn't give my brother a chance either.''
The mother's lawyer, Lorraine Smith, told the court that her client could not cope with her daughter's behaviour problems and was let down by Child Youth and Family.
"That little girl was a timebomb waiting to explode and was put back into the care of her mother.''
She said the mother, who was also abused as a child, tried to get help for her troubled daughter, including writing to the Prime Minister.
Social Development Minister Paula Bennett wrote back offering six additional counselling sessions and financial help for sports and after-school programmes.
"Sports activities are not what this child needed,'' Ms Smith said.
However Judge Gibson said the mother should have persuaded CYF to take the girl back. He also declined to take into account the mother's background.
"That is not a licence to inflict similar pain and suffering on young children and at the end of the day, the defendant knew what was right and wrong.''
He said the girl may have been a "difficult child''.
"But instead of offering comfort and support, she [the mother] ended up violating and abusing her.''
The woman's partner has pleaded guilty to two charges of assaulting the girl, which involved the use of a vacuum cleaner pipe and a broomstick. He will be sentenced in February.
The case sparked a ministerial inquiry, the results of which were released by Ms Bennett this afternoon.
"This child was subjected to cruel and barbaric abuse from her own parents in an unusual case where the mother manipulated many into thinking she had her child's best interests at heart,'' Ms Bennett said.
The inquiry was conducted by former ombudsman Mel Smith, and looked at the girl's case as well as other matters relating to the welfare and protection of children.
It included 13 recommendations.
They include better information sharing, new Child Youth and Family workers for schools, mandatory reporting of abuse and neglect, urgent research on kinship care, and a new Child Protection Court.