The shooting was reported at 2:26 a.m. near the intersection of 12th and Kissling streets.
The 36-year-old victim was walking on the street when he was approached by two suspects who said "What's up?"
One of the suspects then shot the man in the right leg with a handgun while the other suspect took his phone, according to police.
The victim was taken to San Francisco General Hospital to be treated for his injuries, which are not considered life-threatening, police said.
The suspects, two men in their 20s, fled and had not been found as of this morning.
Anyone with information about the case is encouraged to call the Police Department's anonymous tip line at (415) 575-4444 or send a tip by text message to TIP411.