Police responded to a report of a shooting near 16th and Mission streets about 2:20 a.m., according to police.
Arriving officers found a man suffering from a gunshot wound to the back, police said.
The victim, whose name has not been released, was taken to San Francisco General Hospital, where he was pronounced dead a few hours later, police said.
No arrests have been made and information about a suspect was not available, police said. Police searched the area for any potential witnesses.
Anyone with information is encouraged to call San Francisco police homicide investigators at (415) 553-1145 or the anonymous tip line at (415) 575-4444.