Cobb was called up to the majors for the first time on May 1, 2011, and he made his major league debut that day. He was optioned back to the minors after the game. On May 31, Cobb was recalled back to the majors. On June 7, Cobb earned his first major league victory while starting for the Rays. Cobb pitched for 61⁄3 innings and the Rays defeated the Angels 4–1. In late July, Cobb began to experience numbness and swelling in his right arm. After an August 5 start, he required surgery to repair a blood clot in his chest and remove one of his ribs, which had caused the blood clot. The two surgeries ended his 2011 season.
Cobb was invited to spring training in 2012, but sent to minor league camp to begin the season. Cobb was called up to fill in for Jeff Niemann while Niemann was injured. On August 23, 2012, Cobb pitched his first career complete game shutout against the Oakland Athletics. He did not lose in his first seven starts, and ended the season with a 3-2 record and a 3.42 ERA in nine games started at the major league level.
On May 10, 2013, Cobb struck out all four batters in one inning. He also gave up one run in that inning after the batter stole second base, third base, and was then balked home for the first time in recorded baseball.
Cobb was struck in the head by a line drive off the bat of Kansas City Royals first baseman Eric Hosmer on June 15, 2013. Cobb left the field on a stretcher, and was transported to Bayfront Medical Center in St. Petersburg, Florida. It was reported that Cobb suffered a mild concussion and had a cut on his right ear, while all other scans and tests came back normal, and he would be released the next day. Cobb would miss two months, making his return on August 15. In 22 starts of 2013, Cobb finished the year 11-3 with a 2.76 ERA.
One year later, Cobb endorsed a product designed to help protect young ball players from similar injuries: the isoBLOX padded cap insert. The insert, a skull cap which fits underneath adjustable or stretch caps, is based on the same technology Major League Baseball approved for on-field use in January 2014.
“If boys and girls start wearing protective inserts, it will become second nature for them when they’re older,” Cobb said. “I want to be a part of the evolution toward introducing this successfully at the big league level and I think the best way to do it is by starting at youth ages,” he said. “My optimism is through the roof. The biggest thing is to further the process for technology to catch up, where we can wear it without altering mechanics or comfort—this is the best step.” In 2014, Cobb went 10-9 with a 2.87 ERA in 27 starts.
To begin the 2015 season, Cobb was placed on the 15-day disabled list due to right forearm tendinitis. On May 5, 2015, it was revealed that his elbow was diagnosed with a partial tear of the UCL. Three days later it was announced that he would undergo Tommy John surgery.