Police said the boy was on Drew Street around 4 p.m. Thursday when two men drove up in a blue Chevy Tahoe.
They shouted a gang affiliation and opened fire. The boy is expected to be OK, according to officials.
Irving Middle School is just three blocks away, but it was not immediately known if the victim was a student there.
Police detained two suspects and are investigating two other calls of shots fired in the area around the same time.