The boy was charged with aggravated criminal sex assault and armed robbery with a firearm in connection with the assault, according to Chicago Police News Affairs.
The attack happened in the 6300-block of South Paulina Avenue, according to authorities.
The girl was walking down the block around 10:15 a.m. when an unknown offender approached her, pulled her into a gangway and sexually assaulted her at gunpoint, police said.
The offender took her cell phone, iPod and fled the scene, officials said. The girl was in stable condition at Comer Children's Hospital.
The block where she was assaulted is lined with boarded-up, abandoned buildings. Neighborhood resident William Wallace said he believes these buildings attract crime to the area.
"Vacant lots, vacant buildings. That's a problem in this neighborhood. They need to have somebody living there or tear it down," he said.
His sister Cynthia Wallace said she saw the young victim running out of the alley. The girl ran up to her crying and asked if she could walk with her. The girl ran foward and was then taken to the hospital, according to Cynthia Wallace.
The alleged offender is expected to appear in court Friday.