Cole attended Oviedo High School in Oviedo, Florida. He played for the school's baseball team, and committed to attend the University of Miami on a college baseball scholarship. Considered a potential first-round pick in the 2010 Major League Baseball draft, Cole fell in the draft due to his commitment to Miami and reportedly due to a high signing bonus demand. The Washington Nationals selected Cole in the fourth round of the draft. He received a $2 million signing bonus to forgo his commitment to Miami, a record bonus for a fourth-round pick.
Cole pitched for the Vermont Lake Monsters of the Class A-Short Season New York–Penn League after he signed with the Nationals in 2010, and for the Hagerstown Suns of the Class A South Atlantic League in 2011. In those two seasons, Cole recorded 109 strikeouts in 90 innings pitched.
On December 23, 2011, Cole was traded with Derek Norris, Tommy Milone, and Brad Peacock to the Oakland Athletics for Gio González and Robert Gilliam. Assigned to the Stockton Ports of the Class A-Advanced California League to start the 2012 season, Cole struggled, pitching to a 0–7 win–loss record with a 7.82 earned run average, allowing a batting average against of .364 in eight games. The Athletics demoted him to the Burlington Bees of the Class A Midwest League, where he made 19 starts, pitching to a 2.07 ERA and recording 102 strikeouts compared to 19 walks in 95 2⁄3 innings.
On January 16, 2013, Cole was traded back to Washington along with Blake Treinen and a player to be named later (later identified as Ian Krol) in a three-team trade that sent Michael Morse to the Seattle Mariners and John Jaso to Oakland. Cole pitched for the Potomac Nationals of the Class A-Advanced Carolina League, and was named to appear in the 2013 All-Star Futures Game. He was promoted to the Harrisburg Senators of the Class AA Eastern League during the season. In 2014, Cole began the year with Harrisburg, and received a promotion to the Syracuse Chiefs of the Class AAA International League. After the 2014 season, the Nationals added Cole to their 40-man roster.
Cole opened the 2015 season as the Opening Day starting pitcher for Syracuse. The Nationals promoted Cole to the major leagues to make a start in place of Max Scherzer on April 28.; while Cole had a miserable outing, giving up nine runs in only two innings, he would get a no-decision after the Nationals, who had lost six straight, would come back to win the game 13-12, starting a span where they win 20 of 25 games and jump from last to first in the NL East. Cole only appeared in two more games for the Nationals, both out of the bullpen, in 2015. He continued to make starts after being optioned back to Syracuse. While he was called up after rosters expanded in September, he did not pitch in another major league game before the end of the season.
Cole spent the 2016 season again pitching in Syracuse's rotation. Working exclusively as a starter, he pitched to a 4.26 ERA (up by more than a full run from 2015) over 22 games, including two complete-game performances, before he was called up by the Nationals on August 18, 2016, to fill in as a reliever. Due to the Nationals' acquisition of closer Mark Melancon in July, who wears the number #43 as a Washington player, Cole exchanged his number #43 for #22 upon being called up. Cole was placed in the Nationals' rotation later in the month after Stephen Strasburg went on the disabled list. He notched his first career win on September 2, 2016, against the New York Mets, giving up just one earned run on three hits and two walks over six innings on the road. On September 26, Cole was ejected for the first time in his Major League career after throwing a pitch behind Jung-ho Kang. Thereafter, tempers flared with the benches clearing, but the Nationals nonetheless won 10-7 over the Pirates.
Cole married his wife, Christine Pulliam Cole, in 2015.