He has previously played in MLB for the St. Louis Cardinals, Baltimore Orioles, and Los Angeles Dodgers.
[3] Flaherty played for the United States national team at the 2013 18U Baseball World Cup, pitching 10+1⁄3 innings to help win the Gold Medal in the tournament.
[4] On April 29, 2014, Flaherty pitched a complete game, a 2–1 victory over Bishop Alemany High School, to bring a two-year win–loss record to 20–0.
It was a compensatory pick that the Cardinals gained when Carlos Beltrán signed with the New York Yankees as a free agent.
[22] On March 25, 2018, the Cardinals announced that Flaherty had made the Opening Day roster in place of the injured Adam Wainwright.
[37] Following the season, he was nominated for his first ever Gold Glove and finished fourth in National League Cy Young Award voting.
[40] He made his post-season debut this season, making two starts in the Division Series against the Atlanta Braves and allowing four runs in 13 innings while striking out 16.
[43] He also made one start in the Wild Card Series, allowing only one run in six innings but taking the loss when the Cardinals were shut out by the San Diego Padres.
[45] He made his second consecutive Opening Day start[46] and on May 8, hit his first career home run off of Colorado Rockies starter Austin Gomber.
[52] On March 22, Flaherty signed a one-year, $5 million, contract with the Cardinals to avoid salary arbitration.
[21] On August 1, 2023, Flaherty was traded to the Baltimore Orioles in exchange for prospects César Prieto, Drew Rom, and Zack Showalter.
[58][59] Two days later, he allowed a run in six innings to earn the win in his Orioles debut against the Toronto Blue Jays.
[60] He was 1–3 with a 6.75 ERA in nine appearances (seven starts) for the Orioles in the regular season[21] and allowed one run on two hits in two innings of relief in the Division Series against the Texas Rangers.
[21] On July 30, 2024, the Tigers traded Flaherty to the Los Angeles Dodgers in exchange for minor league prospects Thayron Liranzo and Trey Sweeney.
[21] Flaherty pitched Game 2 of the 2024 NLDS against the San Diego Padres and took the loss, while allowing four runs in 5+1⁄3 innings.
[64] In his second postseason start, in the opening game of the 2024 NLCS against the New York Mets, he pitched seven scoreless innings in the Dodgers shutout win.