The shooting was reported about 4:45 p.m. in the area of East Hillsdale Boulevard and South Norfolk Street in San Mateo.
The shooting victim was found in nearby San Carlos after being driven away from the scene, police said. The victim was taken to a trauma center but their condition was not available.
There had also been reports of a shooting victim in Millbrae, but police determined that incident wasn't related to the San Mateo shooting scene.
"As this all unfolded, SMPD was able to locate the apartment our suspect had fled to and was able to negotiate a surrender. That subject was taken into custody," police said in an advisory.
A shelter in place for the area was lifted about 7:30 p.m.