The boy was in a green Toyota Camry driven by 21-year-old Brandi Navarro, of Fairfield, and three other juveniles, police Sgt. Kevin Carella said.
Officer Tom Shackford heard gunshots while on patrol in the 1800 block of North Texas Street around 2:30 a.m., Carella said.
Shackford then saw the Toyota speeding away from the area and followed it until it ran up a curb, hit a pole and flipped over, Carella said.
The five occupants of the car crawled out of the passenger compartment and were taken into custody, Carella said.
The 15-year-old boy was arrested on suspicion of negligent discharge of a firearm and being a minor in possession of a loaded firearm, Carella said.
The teen was shooting at someone outside the car whom police were unable to locate, Carella said. Police are not aware of anyone who was hit by the gunfire.
Navarro was arrested on a warrant for violating her probation, and the other three juveniles were treated for minor injuries at NorthBay Medical Center then released to their parents, Carella said.
Before the crash, someone threw a gun from the vehicle, Carella said.
Officers recovered the handgun in the bushes and found photos of the weapon on the 15-year-old boy's cellphone, Carella said.
Carella said no one in the vehicle would say who was being shot at, but the incident is not believed to be gang-related.