She won the Democratic primary for state's attorney's race on March 15, 2016 with 58% of the vote, and went on to win the November general election with 72% of the vote. Foxx announced on November 19, 2019, that she would run for re-election. She faced three competitors in the Democratic Party primary: Bill Conway, Bob Fioretti, and Donna More. Ahead of the primary, Foxx had been endorsed by several progressive organizations, labor unions, and state-wide elected officials. She won the primary election on March 17, 2020, with 50.19% of the vote. Relative to the 2016 election, she maintained a high level of support in the county's majority-African American neighborhoods and lost some support in white neighborhoods (especially in Chicago's northwest side and in suburban Cook County). She will face Republican Pat O'Brien in the general election on November 3, 2020. In March 2017, shortly after taking office, Foxx announced that the State's Attorney's office would no longer pursue keeping certain detainees in jail because they are unable to post the bail amount of $1000. Foxx expressed support for the proposed Bail Reform Act, testifying in favor of it at the Illinois General Assembly despite opposition to the bill from the Illinois State’s Attorneys’ Association. The legislation passed in June 2017 and removed the requirement to post cash bail for those charged with minor crimes. That same month, Foxx's office announced that prosecutors would no longer request pretrial detention for those charged with low-level noviolent offenses in court. In March 2018, Foxx's office launched an open data portal and released 6 years of data on felony criminal cases. Since then, case-level data on felony intake, initiation, disposition, and sentencing, along with summary reports and dashboards, have been posted on the State's Attorney office's website. A series of reports by The People's Lobby and Reclaim Chicago, progressive organizations who had endorsed Foxx in 2016, found that the number of sentences involving prison time in Cook County dropped 2.5% from 2016 to 2017 and 19% from 2017 to 2018. An October 2019 report by The Marshall Project found that since taking office, Foxx "turned away more than 5,000 cases that would have been pursued by previous State’s Attorney Anita Alvarez, mostly by declining to prosecute low-level shoplifting and drug offenses and by diverting more cases to alternative treatment programs." Foxx has directed her office to not prosecute shoplifting cases under $1,000 as felonies.