Alexander was then selected by the Kansas City Royals in the sixth round of the 2010 Major League Baseball Draft and signed with them on June 11, 2010 for a $130,000 signing bonus. He made his professional debut that season with the Idaho Falls Chukars of the Pioneer Baseball League, where he was 1–6 with a 5.73 ERA in 12 games. He subsequently missed the entire 2011 season due to left shoulder surgery and returned in 2012 to pitch in 10 games for the Kane County Cougars of the Midwest League where he had a 2.55 ERA. Alexander moved between three levels in the Royals farm system in 2013, with five games for the Lexington Legends of the South Atlantic League, 12 for the Wilmington Blue Rocks of the Carolina League and 24 for the Northwest Arkansas Naturals of the Texas League. Overall, he was 5–1 with a 3.00 ERA and appeared exclusively out of the bullpen. He did not allow a homerun all season and pitched had the second most innings pitched in the minor leagues without a homer. In 2015 he pitched in 35 games for the Naturals and 11 for the Omaha Storm Chasers of the Pacific Coast League. He finished 2–4 with a 4.52 ERA in 67 innings. He pitched for the Gigantes del Cibao of the Dominican Winter League after the season and then returned to Omaha for 2015, where he was 2–3 with a 2.56 ERA in 63 innings over 41 games. The Royals selected him as their Triple-A Pitcher of the Year. Alexander was called up to the majors for the first time on September 1, 2015 and he made his MLB debut the following day against the Detroit Tigers. He pitched a scoreless ninth inning, retiring two batters on groundouts and then striking out Nicholas Castellanos to end the game. He pitched in six innings over four games for the Royals that season, allowing three runs on five hits with three strikeouts. In 2016, he pitched in 22 games for Omaha and 17 for the Royals. In the minors, he was 2–0 with a 3.00 ERA in 30 innings and in the majors he had a 3.32 ERA in 19 innings. He made seven more appearances in the minors in 2017 but spent most of the year with the Royals, where he was 5–4 with a 2.48 ERA in 69 innings over 58 games. He picked up his first MLB win on July 2 when he pitched two scoreless innings against the Minnesota Twins and his first save on August 22 against the Colorado Rockies.
On January 4, 2018, Alexander was traded to the Los Angeles Dodgers in a three team trade that also sent Jake Peter to the Dodgers, Luis Avilán and Joakim Soria to the Chicago White Sox and Trevor Oaks and Erick Mejia to the Royals. The Dodgers used Alexander as an opener on June 1 due to an injury to Clayton Kershaw. In his first season in L.A, Alexander appeared in 73 games, allowing 27 earned runs in 66 innings for a 3.68 ERA. He appeared in four games in the postseason for the Dodgers, one in the 2018 NLDS and three in the 2018 World Series, allowing two runs to score on one hit and two walks in 2 innings pitched. In 2019, he pitched in 28 games for the Dodgers, with a 3–2 record and 3.63 ERA. He went on the injured list on June 12 as a result of left forearm inflammation which turned out to be a nerve issue. He underwent season ending surgery to address the issue in September. Despite the injuries, the Dodgers inked him to a one-year, $875,000, contract following the season, to avoid arbitration.
Personal life
Alexander has Type 1 diabetes, a condition that was diagnosed during the 2016 season. He has three brothers, all of whom played baseball. His older brother, Stu was drafted by the Florida Marlins in the 29th round of the 2003 Major League Baseball draft and played in their minor league system until 2009. His younger brother, Jason, signed a minor league contract with the Los Angeles Angels in July 2017.