Koster was elected to the Missouri State Senate as a Republican in 2004. In August 2007, he switched his party affiliation to the Democratic Party. Announcing the switch, Koster said he felt the Republican Party had become too extreme. "This fight is now real, and will moreover, have extraordinary consequences for Kansas City, St. Louis, Columbia, our state, our educational institutions, and our collective futures," Koster said.
In 2004, Koster, running as a Republican at the time, was elected by the voters of Missouri's thirty-first senatorial district to the Missouri State Senate. Differences in opinion between the state's Republican leadership and himself on issues such as embryonic stem cell research led Koster to announce his party switch to the Democrats in August 2007, the first high-profile elected official in the state's history to do so. In his press conference speech, Koster called the far-right's influence on the Republican Party "toxic," earning accolades from Missouri Democrats. At the same time, however, many saw this as political opportunism in the same spirit as Pennsylvania Senator Arlen Specter's party-switch. In the Senate, he introduced a measure which made it a crime to rent apartments to illegal aliens and voted in the Missouri General Assembly to cut Medicaid.
In April 2008, David Martin of The Pitch wrote that then-candidate for Missouri Attorney General Chris Koster had planted Molly Korth Williams, a last-minute addition to the list of state attorney general contenders, as a means "to siphon votes from another woman in the primary, Margaret Donnelly." Martin pointed to her lack of legal experience, absence of records that indicate her forming a campaign committee and to a close relationship between Williams and Judge Joseph Dandurand, Koster's political mentor. While Williams denied the accusation, claiming her campaign was legitimate, Koster's campaign office neither confirmed nor refuted Martin's claim. Others noted this should not have come as a surprise since "recruitment of primary challengers to weaken other candidates has been a hallmark of Cass County (Dandurand and Koster's home base) politics for years."