One bullet discharged about 11 a.m. in the school's cafeteria, spraying fragments at the students, said Houston Independent School District Assistant Police Chief Robert Mock.
"Either some type of chips off the floor, or it could be pieces of the round that discharged," Mock said. "They had some cuts and stuff on their legs, they don't appear to be life threatening."
Two 6-year-old boys, including the one who had the gun, were wounded in the foot, said district spokesman Jason Spencer. A 5-year-old girl also suffered a foot injury, Spencer said.
Images taken from Houston television station KPRC's news helicopter showed three children being wheeled to ambulances on stretchers. All were sitting up and appeared to be talking with emergency personnel. Upset parents rushed to the scene.
Houston is the state's largest school district with more than 200,000 students.