The shooting happened Monday afternoon just west of the Alamo Drive exit in Vacaville.
The boy's grandmother told NBC Bay Area that the child was on his way to baseball practice when someone started shooting at the family car. The boy was shot in the foot. He was scheduled to have surgery on Tuesday at Oakland Children's Hospital.
The California Highway Patrol said it's still trying to determine what led up to the shooting. At this point, no suspect information has been released.
Get a weekly recap of the latest San Francisco Bay Area housing news. Sign up for NBC Bay Area’s Housing Deconstructed newsletter.