The state's attorney says Campbell, 27, of Blue Island, tried to lure the victim and her older sister outside their home first.
Police say the girls ignored him and ran inside, so the suspect then allegedly kicked down the door and told everyone inside to leave.
A relative called police, who say they found Campbell in a closet smoking a cigarette.
Judge Edward Bowden ordered Campbell held without bond Wednesday at the Markham courthouse, according to court records. Bowden also ordered Campbell to undergo psychiatric evaluation. Campbell has two previous felony convictions for burglary and aggravated robbery.
The Sun-Times Media Wire contributed to this report.