Following injuries to Donovan Solano and Chris Valaika, the Marlins promoted Dietrich to the major leagues on May 8, 2013, and he made his MLB debut that day. He was optioned back to Jacksonville on July 22. In 2014, Dietrich served as the Marlins' starting second baseman. They optioned Dietrich to the New Orleans Zephyrs of the Class AAAPacific Coast League in June due to his poor defense. After the season, Dietrich played winter baseball in the Dominican Professional Baseball League, but his season ended prematurely due to an ankle injury. Dietrich began the 2015 season with New Orleans. The Marlins promoted him to the major leagues on June 12. In 2016, Dietrich batted.279, and was 2nd in the major leagues in hit by pitch, with 24. He had his best offensive season in 2017, posting career highs in games played, at bats, runs, home runs, RBI and walks. In 2018, Dietrich batted.265/.330/.421. He tied for the major league lead in hit by pitch, with 21. Dietrich was designated for assignment on November 20. After clearing waivers, Dietrich elected free agency on November 26.
Cincinnati Reds
On February 19, 2019, Dietrich signed a minor league contract with the Cincinnati Reds, receiving a non-roster invitation to spring training. In his Reds debut on March 28, Dietrich hit a three-run home run as part of a 5–3 win on Opening Day over the Pirates. In a game on April 7, 2019, against the Pittsburgh Pirates, Dietrich hit a second-inning, two-run home run that landed in the Allegheny River off of Pirates starter Chris Archer. As the ball flew over the wall, Dietrich stayed at home plate and admired the ball for a few seconds as it went over before he started running. When Dietrich returned to bat in the fourth inning, Archer threw a ball behind Dietrich's back. Home plate umpireJeff Kellogg issued Archer a warning, much to the irritation of Reds manager David Bell. As Bell argued with the umpire, benches cleared and Yasiel Puig attempted to throw punches at the Pirates players. In the end of the incident, five people were ejected: Bell, Puig, Reds southpaw Amir Garrett, Pirates setup man Keone Kela, and Pirates closer Felipe Vázquez. When play resumed, Dietrich was struck out by Chris Archer, but got another two-run home run, also hit into the river, later in the game off of Pirates pitcher Nick Kingham. In late June 2019, Dietrich set a new MLB record for being hit by pitch in a single series, when he was hit six times in the first three games of a four-game series with the Milwaukee Brewers. After the 2019 season, the Reds sent Dietrich outright off of the 25-man roster to the Louisville Bats. On November 4, 2019, Dietrich cleared waivers and was sent outright to the Louisville Bats. On February 12, 2020, Dietrich re-signed with the Reds on a minor league deal. On July 20th 2020, the Reds released Dietrich per his request. Dietrich had an opt-out clause in his contract. Dietrich was not expected to have a large role with the Reds for the 2020 season.
Chicago Cubs
On July 23, 2020, Dietrich signed with the Chicago Cubs.
Personal life
Dietrich's grandfather, Steve Demeter, played in Major League Baseball. Dietrich credits his grandfather with teaching him about the game of baseball. Dietrich is a juggler and performs at community events and hospitals for children.