He made his MLB debut with the Diamondbacks on April 4, 2016.[11] In 68 games, Barrett posted an ERA of 3.49 with 4 saves. The following two seasons, Barrett has struggled with consistency and injury, being limited to 35 total appearances between 2017 and 2018.
On February 5, 2019, the Diamondbacks traded Barrett to the San Francisco Giants in exchange for cash considerations.[12] He was then designated for assignment again on February 22. On March 1, Barrett was claimed off waivers by the Pittsburgh Pirates.[13] Barrett was designated for assignment on March 28, after the contracts of J. B. Shuck, Melky Cabrera, and Francisco Liriano were selected.
On April 4, 2019, the New York Yankees claimed Barrett off of waivers.[14] On May 4, he was recalled from the Triple–A Scranton/Wilkes-Barre Railriders to replace James Paxton. Barrett made 2 appearances for the Yankees, compiling a 14.73 ERA with 4 strikeouts across 3+2⁄3 innings pitched. Barrett was outrighted off the Yankees' roster on November 4 and subsequently elected free agency.[15]
Barrett re-signed with Monclova for 2021. In 2 games 2 innings of relief he went 1-0 with a 0.00 ERA and 4 strikeouts.
Barrett re-signed with Monclova for a third season in 2022. He spent the entire season recovering from injury and did not appear.
Barrett re-signed with Monclova for a fourth season in 2023. In 31 games 32.2 innings of relief he went 3-3 with a 5.51 ERA with 30 strikeouts and 2 saves. He was placed on the reserve list on August 5.
Barrett re-signed with Monclova for a fifth season in 2024. He did not appear in a game and spent the entire season on the reserve list.
^Garcia, Jose (May 31, 2009). "Barrett Stays 'Humble'". Arizona Republic. Archived from the original on March 4, 2016. Retrieved November 15, 2013.(subscription required)