Barnes attended Manhasset Secondary School in Manhasset, New York, where he earned four varsity letters. As a senior, he posted an 8–1 win–loss record, 0.80 earned run average, and 103 strikeouts in 58 innings pitched. After graduation, he attended Princeton University, and played three seasons for the Princeton Tigers while majoring in economics. In 2008, Barnes made 12 appearances, four of which were starts, and posted a 2–4 record, 4.58 ERA, and 37 strikeouts in 37 innings. Injuries limited him to just 8 innings in 2009. In 2010, Barnes made nine starts for the Tigers, and pitched to a 1–3 record, 5.14 ERA, and 40 strikeouts in 49 innings.
Barnes was drafted by the Toronto Blue Jays in the 35th round of the 2010 Major League Baseball draft, and assigned to the Gulf Coast League Blue Jays of the Rookie-levelGulf Coast League. He made 14 relief appearances for the team, and was promoted to the Lansing Lugnuts of the Class-AMidwest League to end the season. In 37 combined innings, Barnes finished the 2010 season with a 1–1 win–loss record, 2.15 ERA, and 53 strikeouts. He spent the entire 2011 season in Lansing, making 44 appearances and posting a 5–1 record, 2.32 ERA, 99 strikeouts, and 13 saves in a career-high 66 innings pitched. Barnes played with the Dunedin Blue Jays of the Class-A AdvancedFlorida State League for most of the 2012 season, making one appearance for the New Hampshire Fisher Cats of the Class AAEastern League at the end of the season. In 51 total appearances, he would pitch to a 1–3 record, 1.87 ERA, 65 strikeouts, and 34 saves in 53 innings. Barnes made just four appearances totaling three innings pitched in 2013 before being shut down due to a rotator cuff injury. In 2014, Barnes made 36 appearances for Dunedin, and posted a 0–5 win–loss record, 4.19 ERA, 49 strikeouts, and 7 saves in innings. In the offseason he made 4 relief appearances for the Gigantes de Carolina of the Puerto Rican Winter league. Barnes pitched the entire 2015 minor league season with the New Hampshire Fisher Cats, finishing the season with a 3–2 record, 2.97 ERA, and 74 strikeouts in 60 innings. He began the 2016 season in New Hampshire, and after pitching to a 1.01 ERA in 35 innings, was promoted to the Buffalo Bisons of the Class AAAInternational League in June. On August 2, 2016, the Blue Jays promoted Barnes to the major leagues. He made his MLB debut that night, holding a 2–1 lead with a scoreless inning of relief against the Houston Astros that included strikeouts of Alex Bregman and Carlos Correa. Barnes was optioned back to Buffalo on August 9, and recalled by the Blue Jays on September 1. He appeared in 12 games for the Blue Jays in 2016, recording a 3.95 ERA and 14 strikeouts in 13 innings. On October 8, Barnes was added to the Blue Jays' American League Division Series roster after Francisco Liriano suffered a concussion. On May 23, 2017, Barnes earned his first major leaguewin after pitching 1 scoreless innings against the Milwaukee Brewers in a game the Blue Jays won 4–3. On July 25, he was placed on the 10-day disabled list with a right shoulder impingement. Prior to his injury, Barnes appeared in 37 games for the Blue Jays, pitching to a 3.09 ERA with 47 strikeouts in 43 innings. Barnes was activated from the disabled list on August 4. He would go on to appear in 23 more games for the Blue Jays in 2017, finishing the season with a 3.55 ERA and 62 strikeouts in 66 innings. Barnes also finished the season second among qualified American League relievers in inherited runner efficiency, allowing only 5 of 37 inherited runners to score. On December 6, Barnes was voted the Blue Jays' Rookie of the Year for 2017 by the Toronto chapter of the Baseball Writers' Association of America. On June 11, 2018, in a game against the Tampa Bay Rays, Barnes reached both 100 major league games played and 100 career strikeouts. He was placed on the 10-day disabled list with left knee tendinitis on June 22, and was activated on August 1. Barnes appeared in 47 games for the Blue Jays in 2018, and finished the season with a 5.71 ERA. The Blue Jaysdesignated Barnes for assignment on January 29, 2019, and he was outrighted to the Buffalo Bisons on February 5. He became a free agent following the 2019 season.
Baltimore Orioles
On March 9, 2020, Barnes signed a minor league deal with the Baltimore Orioles. He was not invited to Major League Spring Training.
Personal life
Barnes' parents, Edward and Maria, attended Columbia University and Barnard College respectively, and are both doctors. He has an older brother, Christopher, and three younger sisters named Anastasia, Kiki, and Katie.