He fell into the position by chance, his first term after Gavin Newsom's election as Lt. Governor opened a vacancy in the city's top office. With two years left on the term, someone needed to fill Newsom's seat. That fell on the board of supervisors to name a successor.
TIMELINE: A look back at the life of SF Mayor Ed Lee
Under city charter, supervisors could not vote for themselves and nominated three popular city politicians and one largely unknown candidate - City Administer Ed Lee.
Lee reportedly didn't want the job - he was on vacation with his family when the call came. But, at the urging of community leaders, he finally gave in.
Supervisors voted 10 to one to name Lee mayor.
Lee's appointment was also seen a huge victory for the city's Asian American community. He was sworn in as the first Chinese American mayor in the city's 160-year history.
RELATED: What we know about San Francisco Acting Mayor London Breed
" I really believe if people don't trust you, you really have no role in government," Lee said in 2011, "and this is what I want to restore more civility and more belief by the people here that they can trust their government to do the right thing."
Lee hit the ground running, earning accolades for his ability to bring the city together.
He had agreed to be just a placeholder, not to seek a full term, but a grassroots movement was launched. The campaign, "Run Ed, Run Ed", even featured Lee in a video featuring M.C. Hammer's "Too Legit to Quit."
The mayor appeared to waiver at first, but was swayed by political insiders and Ignited a fierce debate over his broken promise. Lee ran and won in November 2011.
RELATED: San Francisco Mayor Ed Lee passes away at the age of 65
By the 2015 election, any bad feelings seemed to subside. Lee faced no substantial challenger and was re-elected with 56-percent of the vote.
PHOTOS: From advocacy work to light-hearted fun, here's a look at San Francisco Mayor Ed Lee's career
RELATED: Officials remember San Francisco Mayor Ed Lee
Click here for more stories on Ed Lee.
Politics aside.. I'll never forget Mayor Ed Lee's kindness after my hip surgery. He sent me flowers. Rest In Peace. pic.twitter.com/F7cdYRX4vc— carolyn tyler (@ctylerabc7) December 12, 2017