The victim was identified by the medical examiner's office as Isaac Hudson, of San Francisco.
The crash happened shortly after midnight at the intersection of Alemany Boulevard and Congdon Street, just off Interstate Highway 280 in the Outer Mission, police said.
The circumstances of the crash are still being investigated, but police spokeswoman Sgt. Lyn Tomioka said two cars were involved and that witnesses reported seeing three men running from the second car after the crash.
Hudson was found inside his car and pronounced dead at the scene, Tomioka said.
Tomioka said parked cars in the area were hit as well.