Anderson enrolled at the University of Oregon as a political science major and played college baseball for the Oregon Ducks in the Pac-10 Conference. In 2010, his sophomore year, he was named to the Pac-10 All-Conference Team with a 2.98 earned run average (ERA) (fifth-best in the Pac-10), and his 105 strikeouts were a new Oregon single-season record and ranked sixth in the Pac-10.[3] In 2011, Anderson's junior year, Louisville Slugger named Anderson a Second Team All-American and he was named to the Pac-10 All-Conference Team, after he had an 8–3 record and set two Oregon single-season records. pitching 107.2 innings while striking out 114 batters (5th Pac-12), with a 2.17 ERA (4th Pac-12) while holding opposing batters to a .201 batting average (fifth-best in the Pac-12).[3] In three seasons, Anderson became the Ducks' all-time leader in strikeouts with 285.[4]
On June 11, 2016, the Rockies called up Anderson and placed Jake McGee on the disabled list. Anderson made his MLB debut the following day, allowing only one run in 6+1⁄3 innings against the San Diego Padres. His first major league strikeout was against Wil Myers.[16] He spent the remainder of the season with the Rockies, going 5–6 with a 3.54 ERA in 19 starts.[17] In 2017, Anderson's first full season in the major leagues, he was 6–6 with a 4.81 ERA in 17 games (15 starts). He missed the last three months of the season due to left knee inflammation that required arthroscopic surgery.[18] In 2018 he was 7–9 with a 4.55 ERA in 32 starts in which he pitched 176 innings.[17] He led the major leagues in home runs allowed with 30.[17]
Anderson began the 2019 season in the Rockies rotation but was quickly placed on the disabled list with knee inflammation.[19] He came off the disabled list a week later and made five starts before being demoted to AAA. He was placed on the disabled list after the demotion due to continued knee discomfort.[20] On June 11 he underwent major season-ending surgery for to correct a chondral defect (an area of damage to the cartilage that lines the end of the bones in the knee) in his left knee, which was expected to require a lengthy recovery time.[21] In 2019 with the Rockies he was 0–3 with an 11.76 ERA in five starts covering 20+2⁄3 innings in which he struck out 23 batters.[17]
San Francisco Giants
On October 30, 2019, Anderson was claimed off waivers by the San Francisco Giants.[22] On December 2, Anderson was non-tendered and became a free agent.[23] The following day, on December 3, Anderson re-signed with the Giants on a one-year major league contract.[24] The contract called for a $1.775 million salary plus $500,000 in possible roster bonuses and $350,000 in possible performance bonuses based on number of innings pitched.[25] Anderson threw the first complete game of his career on August 22, 2020, in a 5–1 win over the Arizona Diamondbacks.[26] He finished the season with a 4–3 record and a 4.37 ERA over 59+2⁄3 innings in 13 games (11 starts).[9]
Pittsburgh Pirates
Anderson signed a one-year, major league contract with the Pittsburgh Pirates for $2.5 million on February 17, 2021.[27] In 18 starts for the Pirates, Anderson was 5–8 with a 4.35 ERA and had 86 strikeouts.[17]
Seattle Mariners
On July 27, 2021, Anderson was reportedly going to be traded to the Philadelphia Phillies in exchange for minor league prospects Cristian Hernandez and Abrahan Gutierrez. However, concerns about Hernandez's medical evaluation caused the deal to fall through,[28] and the Pirates traded Anderson to the Seattle Mariners in exchange for Carter Bins and Joaquin Tejada the next day.[29][30] He was 2–3 with a 4.81 ERA in 13 starts for the Mariners.[17]
Los Angeles Dodgers
On March 18, 2022, Anderson signed a one-year contract for $8 million with the Los Angeles Dodgers.[31] He made his first appearance in relief on April 9 against his first team, the Colorado Rockies. After beginning the season in the bullpen, Anderson moved into the starting rotation when Andrew Heaney went down with an arm injury.[32] On June 15, Anderson lost a no-hitter against the Los Angeles Angels, when Shohei Ohtani broke it up with a one-out triple in the ninth inning.[33] After starting the season 10–1 with a 2.96 ERA, he was selected for the 2022 Major League Baseball All-Star Game, though he did not appear in the game.[34]
Anderson finished the season with career-best numbers in wins and earned run average, posting a 15–5 record and a 2.57 ERA. He made 28 starts (and two relief appearances) and struck out 138 batters.[17] He was a finalist for the NL Gold Glove Award at pitcher, but it was won for the third straight season by Max Fried.[35]
Los Angeles Angels
On November 16, 2022, Anderson signed a three-year, $39 million contract with the Los Angeles Angels.[36]