The shooting occurred around 12:20 a.m. in the 2300 block of Filbert Street near Steiner Street in the neighborhood just south of Lombard Street and the Marina District, according to San Francisco Police Deputy Chief Raj Vaswani, who wrote about the case on Twitter.
INTERACTIVE: Take a look at the ABC7 Neighborhood Safety Tracker
The victim in the shooting is expected to survive, while the suspect or suspects fled and remain at large, Vaswani said.
MORE: 1 man shot, killed in San Francisco Bayview District, police say
Supervisor Catherine Stefani, who represents the neighborhood on the city's Board of Supervisors, also took to Twitter to write about the shooting, saying the victim was shot twice during the attempted robbery.
No other details about the case were immediately available. Anyone with information about the shooting is asked to call the Police Department's tip line at (415) 575-4444 or to send a tip by text message to TIP411 with "SFPD" at the start of the message.