Mayor Ed Lee announced Greg Suhr's resignation at a news conference, saying he hoped to "heal the city" that has been rocked by racial tensions.
"The progress we have made has been meaningful but it hasn't been fast enough, not for me and not for Greg, and that's why I have asked Chief Suhr for his resignation," Lee told a news conference.
Hours earlier, Suhr had told reporters that a 27-year-old black woman driving a stolen car was shot and killed by police after she ignored orders to stop the vehicle.
The police department has been under intense scrutiny following the fatal shooting of Mario Woods in December and Luis Gongora in April.
More From This Section
It has also been embroiled in controversy over racist and homophobic text messages exchanged among officers.
"The past several months have shaken and divided our city, and tensions between law enforcement and communities of color that have simmered for too many years have come into full view," Lee told reporters at the news conference.
The mayor said he had appointed Toney Chaplin, a 26-year veteran of the force, as acting police chief, and vowed to continue with reforms.
Activists for months had been calling for Suhr to step down and a group known as the "Frisco Five" had gone on hunger strike for nearly 17 days to press their demands.
San Francisco is just the latest California community where law enforcement is under fire for race-related issues.
Earlier this month, a senior official at the Los Angeles County sheriff's department resigned following criticism over emails he sent disparaging blacks, Muslims, Latinos and women.