Police responded to a report of a shooting near 16th and Mission streets at about 2:20 a.m., according to San Francisco 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 died a few hours later, police said.
No arrests have been made and suspect information was not available, police said.
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.