A boy has been discovered locked in a tiny room within a shed on a remote NSW property, on which his family allegedly built one of the most elaborate drug set-ups seen by police.

The eight-year-old, who was allegedly allowed out of the shed only to do chores, and three other children, aged between 12 months and nine years, have been placed into the care of the Department of Family and Community Services after police discovered them during a raid on the property at Elands, north west of Taree.

The boy was found in a two square metre room at the back in an uninsulated tin shed, the door locked on the outside and with only a single mattress and a bucket inside.

He has told police he had been kept in the shed for more than three weeks, enduring storms and extremely high temperatures and only allowed outside to help the household with chores.