He will join the business in July, with responsibility for Yahoo's ad revenue and operations in the Americas, EMEA and APAC regions, reporting to Yahoo's interim chief executive, Ross Levisohn.
Barrett has been working at Google for the past year, after it acquired Admeld, the supply side platform, where Barrett was chief executive, for $400m.
Prior to Admeld, Barrett worked with Levinsohn at Fox Interactive Media, where he was executive vice-president and chief revenue officer.
Following a tumultuous year at the company, which involved several leadership changes, speculation has been mounting about the future direction of the business.
Many commentators believe that this appointment of a high-profile media figure shows Yahoo's intentions to refocus as an advertising business rather than a technology one.
Barrett also previously held the role of executive vice-president of sales and partnerships at AOL Media Networks and held senior sales positions at Yahoo, GeoCities and Disney Online.
Follow Sarah Shearman on Twitter @Shearmans