The crash happened at about 2:15 a.m. at Geary and Arguello boulevards.
Witnesses reported seeing a black Audi traveling at high speeds and running red lights as it traveled east on Geary Boulevard, San Francisco police Sgt. Michael Andraychak said.
As the Audi crossed Arguello Boulevard, it crashed into a gray Mazda, Andraychak said.
The male driver of the Mazda was pronounced dead at the scene. The driver of the Audi, who is also male, was transported to a hospital and has been detained, Andraychak said.
Traffic along Geary Boulevard was detoured for nearly five hours, with several buses re-routed, San Francisco Municipal Transportation Agency spokesman Paul Rose said.
The crash has since been cleared from the roadway and normal bus service has resumed, Rose said.
Police are investigating whether alcohol or drugs played a role in the crash, Andraychak said.