The shooting was reported at 12:12 p.m. in the 2800 block of Harrison Street, near a busy commercial stretch of 24th Street.
Officer Albie Esparza said police received numerous reports that shots had been fired and someone had been hit.
When officers arrived, they learned that the victim, who was shot in the torso, had been taken by private car to San Francisco General Hospital. He is expected to survive, Esparza said.
Esparza said it appears the victim was standing near a friend's car when someone approached on foot and opened fire with a semi-automatic handgun.
The shooter then ran away, and the friend drove the victim to the hospital a few blocks away, he said.
The shooter is described as a Hispanic man in his mid-20s wearing a black hoodie or jacket. He was last seen running south on Harrison Street toward 25th Street.
Esparza said police found multiple shell casings at the scene but no gun was recovered.
The motive is still under investigation but Esparza said the shooting might have been gang-related, and the gang task force is at the scene.
He said it does not appear the shooting was related to other recent violence in the Mission.
"At this point there is no evidence that would indicate that this incident is related to any other incident we've had in the past few weeks," he said.
He said police have beefed up their presence in the Mission and Potrero Hill neighborhoods in response to recent violent crimes.
"The department is committed to the public safety of the residents," he said.
Anyone with information on the shooting is asked to call the Police Department's non-emergency number at (415) 553-0123, the anonymous tip line at (415) 575-4444 or send a text to TIP411 (847411).