Montgomery was selected by the Kansas City Royals in the first round, with the 36th selection, of the 2008 MLB draft out of William S. Hart High School in Santa Clarita, California. In 2012, he posted a combined record of 5–12 in 27 starts while splitting the season between the Royals' Double A and Triple A clubs. On November 20, 2012, the Royals added Montgomery to the 40-man roster in anticipation of the upcoming Rule 5 Draft of Minor League players.
On March 31, 2015, Montgomery was traded to the Seattle Mariners for Erasmo Ramírez. After an injury sidelined James Paxton, the Mariners called Montgomery up to the majors for the first time on June 2, 2015. He started that night against the New York Yankees at Safeco Field, giving up one run, four hits, and walking two while striking out four and leaving after six innings with a 2–1 lead. He was on track to earn his first major league win, but the Mariners lost the game. On June 23, 2015, Montgomery became the first Mariners left-handed pitcher to ever throw a complete game shutout with 10 strikeouts and no walks, getting the win against the Kansas City Royals 7–0. Following his first career complete game shutout, Montgomery pitched his second consecutive shutout on June 30, 2015. He allowed one hit, a double in the 7th inning, to the San Diego Padres in a 5–0 win. He is the first Mariners pitcher since Freddy García in 2001 to throw complete game shutouts in consecutive starts. On August 30, 2015, Montgomery was sent back down to the Tacoma Rainiers. He made the Mariners' opening day roster in 2016 as a reliever.
Chicago Cubs
2016 Season
On July 20, 2016, the Seattle Mariners traded Montgomery and prospect Jordan Pries to the Chicago Cubs for prospects Dan Vogelbach and Paul Blackburn. After allowing a three-run home run to the first batter he faced as a Cub, Montgomery performed well during the remainder of the season. He pitched in 17 games, with a 2.82 ERA with the Cubs. Montgomery had a strong postseason performance in 2016, playing an instrumental role in the team's championship run. Cumulatively he went 1-1, including 11 appearances, innings pitched, and a 3.14 ERA. Most notably, Montgomery relieved Carl Edwards Jr. in the bottom of the 10th inning in Game 7 of the World Series. With a runner on first base and two outs in a one-run game, he finished the game with a ground out to third base. Montgomery earned his first career save, winning the World Series for the Chicago Cubs for the first time in 108 years.
2017 Season
Montgomery continued to perform well in 2017, with 44 appearances, and a 3.38 ERA for the season. His record was 7-8, along with three saves. His performance through mid-May was exceptional, with his ERA dropping to 1.08. After gradually rising to 4.01 in mid-July, it leveled out in the remainder of the season. Of note, Montgomery hit his first career home run off Atlanta Braves pitcher R.A. Dickey on July 19. In contrast with his 2016 performance, Montgomery struggled in the 2017 post-season. Between the division series against the Washington Nationals and the league championship series against the Los Angeles Dodgers, Montgomery had five appearances and innings pitched. He allowed three home runs, finishing with a 16.62 postseason ERA.
2018 Season
Montgomery had a 5-6 record with a 3.99 ERA in 124 innings.
2019 Season
Before being traded, Montgomery had a 1-2 record with a 5.67 ERA in 27 innings.
Second stint with Royals
On July 15, 2019, it was reported that Montgomery had been traded back to the Royals, with the Cubs receiving catcher Martín Maldonado in exchange. Despite Montgomery being primarily a reliever and spot starter during his major league career, the Royals used him exclusively as a starting pitcher. He made 13 starts and pitched 64 innings while winning two games and losing seven.