O'Malley was appointed Alameda County district attorney in 2009 by the Board of Supervisors when her predecessor, Tom Orloff, retired.[5] She ran unopposed in 2010 and 2014.[5]
In November 2017, O'Malley investigated a high-profile shooting of a pregnant teenager by Fremont police officers. While investigating the case, she accepted a $10,000 contribution from the Fremont police union, which was the largest single contribution that she had at that point received from a police union. One of the police officers who shot the teenager was the president of the Fremont police union. She later cleared the Fremont police officers, including the union president, of any wrongdoing in the shooting.[5][6][7]
On June 13, 2019, just after the Toronto Raptors clinched the NBA title over the Golden State Warriors, Raptors President Masai Ujiri was allegedly involved in an altercation with an Alameda County sheriff's deputy. The sheriff's office was expected to file reports with the district attorney's office. If filed, O'Malley would decide whether to bring charges against Ujiri.[8] The investigation ended on September 21. Following a private meeting on October 21, 2019, with Ujiri, his attorneys and Assistant District Attorney Terry Wiley, which was held at the sheriff's department, Assistant District Attorney Teresa Drenick wrote in an email to The Toronto Star that the district attorney's office would not be "taking any further action".[9] O’Malley did not charge the sheriff deputy who was proven to have lied in sworn reports.
2018 district attorney campaign
In 2018, O'Malley faced a challenge from a criminal defense and Oakland civil rights attorney Pamela Price, running on policy of police accountability.[5] The race was notable for the large sums of money being spent.[5] Law enforcement unions spent large sums on O'Malley's campaign and in opposition to Price.[5]
End of tenure of office
O'Malley announced she would not seek a fourth term of office and would complete her term ending in the beginning of 2023.[10] The individual that ran against her in 2018, Price, succeeded her.