In 1990, Harris was hired as a deputy district attorney in Alameda County, California, where she was described as "an able prosecutor on the way up". In 1994, Speaker of the California Assembly Willie Brown, who was then dating Harris, appointed her to the state Unemployment Insurance Appeals Board and later to the California Medical Assistance Commission. Harris took a six-month leave of absence in 1994 from her duties, then afterward resumed as prosecutor during the years she sat on the boards. Harris's connection to Brown was noted in media reportage as part of a pattern of Californian political leaders appointing "friends and loyal political soldiers" to lucrative positions on the commissions. Harris has defended her work.
In February 1998, San Francisco district attorney Terence Hallinan recruited Harris as an assistant district attorney. There, she became the chief of the Career Criminal Division, supervising five other attorneys, where she prosecuted homicide, burglary, robbery, and sexual assault cases – particularly three-strikes cases. In 2000, Harris reportedly clashed with Hallinan's assistant, Darrell Salomon, over Proposition 21, which granted prosecutors the option of trying juvenile defendants in Superior Court rather than juvenile courts. Harris campaigned against the measure, which passed. Salomon opposed directing media inquiries about Prop 21 to Harris and reassigned her, a de facto demotion. Harris filed a complaint against Salomon and quit.
In August 2000, Harris took a job at San Francisco City Hall, working for city attorney Louise Renne. Harris ran the Family and Children's Services Division representing child abuse and neglect cases. Renne endorsed Harris during her D.A. campaign.