The shooting was reported shortly before 8:35 p.m. near the intersection of Keith Street and Thomas Avenue, police Officer Albie Esparza said.
Two suspects approached a 20-year-old man and asked him what gang he claimed, according to police.
The victim denied being a gang member, but one of the suspects took out a handgun and shot him in the shoulder, police said.
He was taken to San Francisco General Hospital to be treated for his injuries, Esparza said.
The two suspects, both described as Hispanic males in their late teens or early 20s, fled on foot and had not been arrested as of this morning, according to Esparza.
The shooter was wearing a black hooded sweatshirt and red beanie or bandana, while the other suspect was wearing a black hooded sweatshirt and black beanie, Esparza said.
Anyone with information about the shooting is encouraged to call the Police Department's anonymous tip line at (415) 575-4444 or send a tip by text message to TIP411.