After one year at East Carolina, Cotton was drafted by the Dodgers in the 20th round of the 2012 MLB Draft. He signed this time and made his professional debut with the Ogden Raptors. Cotton spent 2013 with the Great Lakes Loons, Rancho Cucamonga Quakes and Double-A Chattanooga Lookouts. Cotton missed the first two months of the 2015 season, recovering from a broken left wrist. He pitched in one game for the Great Lakes and four for Rancho Cucamonga before being promoted to the Double-A Tulsa Drillers. In late August, he was promoted to the Triple-A Oklahoma City Dodgers and tried out for a potential bullpen callup to Los Angeles. Between the four levels he appeared in 21 games and was 6–2 with a 2.45 ERA. The Dodgers added Cotton to their 40-man roster after the season. He began 2016 in the starting rotation for Oklahoma City and was selected to participate for the world team at the 2016 All-Star Futures Game. During the game, Cotton only faced one batter, throwing merely three pitches against Phillies outfielder Dylan Cozens. However, Cozens flied out, paving the way for Cotton to pick up the win after teammate Yoan Moncada hit a game-winning Home Run for the World Team.
Oakland Athletics
On August 1, 2016, the Dodgers traded Cotton, Grant Holmes, and Frankie Montas to the Oakland Athletics for Rich Hill and Josh Reddick. He was assigned to the Triple-A Nashville Sounds. Cotton retired the first 26Round Rock Express batters he faced on August 9, but allowed a triple with two outs in the ninth inning, just missing a perfect game. He was called up to the Athletics on September 7 to make his major league debut. Cotton began the season in the A's rotation but after starting off slowly he was sent down to AAA. He was soon after called up again but was sent down back to AAA. Cotton's splits between home and road were drastically apart, as at home he was 4-6 with 6.98 ERA while on the road he was 5-4 with a 3.94 ERA. On March 22, 2018, Cotton underwent Tommy John surgery and missed the 2018 season. In 2019, Cotton began his rehab by pitching for the Single-A Stockton Ports but was set back in May by a hamstring injury and elected to have surgery to fix the issue. Cotton returned to the mound in July and pitched for the Triple-A Las Vegas Aviators. Cotton was designated for assignment on November 20, 2019.
Chicago Cubs
On November 23, 2019, Cotton was traded to the Chicago Cubs in exchange for cash considerations.
Personal
His brother, Jamaine Cotton, pitched in the Houston Astros organization from 2010 to 2014.