A mother and stepfather forced their 11-year-old son to live in a filthy converted coal bunker, a court heard on Monday.
Bullied and constantly hungry, the traumatised child was made to live and sleep in the room, described as a "cell" by social workers, and reduced to using a potty as he was locked up each night until morning, Preston Crown Court heard.
The room was described as "freezing" with no heating, a bare lightbulb, concrete walls and floor, while the child left to sleep on a dirty mattress with just a sleeping bag for a blanket.
The boy was put in the room as punishment for raiding the family's fridge, the court heard.
The room was an old outhouse with one exit bricked up and a new one added leading on to the lounge of the house in Blackpool, Lancashire.
When police and social workers visited they removed the child from the room where he had lived for a year, then aged between 11 and 12.
The parents, both in their 40s, cannot be named for legal reasons.
Both have admitted a single charge of cruelty by wilful neglect between January 2010 and January 2011, and will be sentenced later on Monday.
Jeremy Grout-Smith, prosecuting, told the court: "It is the prosecution case the boy spent most of his time at home in the cell, because of his behaviour.
"The case began following concern about the boy, raised at his school in January 2011."
The school reported that the boy always seemed to be hungry, was disruptive and struggled in class.
But when they gave him food he seemed to "calm down" and become more content, Mr Grout-Smith said.
After the school spoke to his parents they were told he had been caught stealing food from the freezer and eating it frozen.
But when the boy was disciplined at school for his bad behaviour he was threatened with being sent home and became "hysterical" and begged: "Don't send me home, I'm sorry, give me one more chance, I will be good."
The family was then referred to social services who, along with a police officer and PCSO visited the home in January last year.
"When opened what they saw was an uncarpeted room, 6ft (1.8m) by 4ft (1.2m), with a single bed. The boy was asleep on a mattress. There was a bare lightbulb and no apparent heating.
The mother initially denied neglect but later accepted the boy's living conditions were inadequate and he should never have been locked in the room.
The parents will be sentenced on Monday.