Mayer, 37, will be Yahoo's fifth CEO in five years, not including two interim CEOs.
Yahoo is struggling to rebound from years of financial malaise and internal turmoil.
Mayer is starting at Yahoo Inc. on Tuesday. Mayer was one of Google's earliest employees.
Ross Levinsohn, who joined Yahoo in late 2010, has been running the company on an interim basis and had been thought to be the lead candidate. Levinsohn filled in after Scott Thompson lost his job in a flap over misinformation on his official biography.