The shooting was reported around noon in the 1100 block of Turk Street, San Francisco police Officer Albie Esparza said.
Officers arrived to find the 9-year-old suffering from a gunshot wound to his lower abdomen, Esparza said.
The boy was taken to San Francisco General Hospital to be treated for his injuries, which are not believed to be life-threatening, Esparza said.
Investigators do not yet know how the boy was shot, he said.
"We're trying to ascertain if it was a stray bullet, if he was shot at, or if it's an accidental shooting," he said.