A father who assaulted and locked up his stepson in a corrugated iron shed has pleaded guilty in a Sydney court.

His partner, who is the boy's biological mother, was also jailed for a maximum three years and eight months.

Now 10, the boy suffered sickening psychological and physical abuse at the hands of his parents for weeks on end during 2015.

It should have been an idyllic childhood spent roaming in the rolling hills of Elands, north west of Taree, in regional NSW.

Instead, the then-eight-year-old was imprisoned and only allowed outside to do chores, such as moving rubbish and carrying bricks.

Police first visited the property on in November 2015 to make inquiries as to way the young boy had not been attending school.

Police facts state when they spoke to the boy, apart from a few scratches which he said were from falling over, he reported to be happy with no visible signs of distress.

When veteran officers raided the property almost two months later, they discovered a scene unlike anything they've experienced in decades of policing.

When examining the rear of the property they discovered the boy locked in the shed, next to a dog kennel.

The child was forced to weather storms and high temperatures, with only a grotty mattress, stool and paint tin to use as a makeshift bathroom.

Acting on a tip-off, officers also stumbled upon one of the most sophisticated drug set-ups they'd ever seen.

A spa lifted up and an outdoor deck rolled away to reveal a trap door leading to a set of stairs.

Inside police found 225 cannabis plants, with an estimated street value of $450,000.

In the Downing District Court yesterday, the 29-year-old stepfather pleaded guilty to six charges, including unlawful imprisonment, failing to provide the necessities of life and assault.