Fresno police say the incident happened at Kings Canyon and Chestnut at about 9:40 on Wednesday morning.
The gunshot victim said he was in the area and saw three people physically assaulting a man. When he tried to intervene, he was shot while still inside his vehicle.
Police say he ended up 1.5 miles away at Minnewawa and Kings Canyon and transported to hospital.
He is expected to survive his injuries.
Cambridge Continuation School, which is across the street from where the scene, was placed on lockdown as a precaution.
They have released no further details.
This story is developing and will be updated.