Modesto police say 39-year-old John Oliver and his girlfriend, 40-year-old Angelica Madrigal, were arrested Thursday after police, city officials and a contractor went to inspect the abandoned house.
They found syringes and piles of human waste inside, along with the child, who was later placed into protective custody.
Sgt. Rick Applegate says the couple had been living there illegally for at least six months.
Police would not disclose the child's gender or relationship to the couple.
The house has now been boarded up.