Herrera, 47, was first elected to the post in 2001 and is perhaps best known for his efforts to advance the campaign to legalize same-sex marriage in California.
He is also known for his defense of Healthy San Francisco, the city's new public health care program, and of the city's bike plan, and for initiating civil injunctions against gang members.
A former deputy city attorney in San Francisco, Herrera then went into private practice as a maritime lawyer and later worked in the U.S. Maritime Administration under President Clinton.
He served on San Francisco's Transportation Commission and Police Commission before being elected city attorney.
Herrera, who ran unopposed in November's election, has also been rumored to be interested in running for mayor of San Francisco.
Today's swearing-in ceremony takes place at 4 p.m. at City Hall. California State Treasurer Bill Lockyer, Mayor Gavin Newsom and state Assemblyman John Perez, D-Los Angeles, who is expected to become the next speaker of the Assembly, will attend.