The shooting took place shortly before Tuesday at 3 p.m. at John W. Cook Elementary School near 81st Street and Bishop.
Police said around the time of dismissal a gunman approached a crowd of students as they were standing in front of the building and fired about four shots. One of the bullets hit the 12-year-old in the back.
The boy was taken to Christ Hospital. Police said he is in critical but stable condition.
The victim's sister, Imone Griffin, told ABC7 the shooting happened possibly because the gunman may have been jealous of her younger brother and his material possessions. She said that the two have had arguments in the past.
"I hope he goes to jail," she said.
Chicago police investigating the shooting said the 12-year-old was the intended target.
Griffin said her brother, who is her only sibling, is a 7th grader at Cook Elementary. She said the suspected gunman is a former student and a few years older than her brother.
Witnesses are helping police in their investigation but they are still discouraged about what happened.
"That's just the thought of some of these folks now, they get guns and have total disregard for human life," said Chicago Police 6th District Commander Eddie Johnson.
Both police and Chicago Public Schools are working together to beef up security at the school Wednesday. There will also be a crisis intervention team in place.