"I am honored and delighted to lead Yahoo!, one of the internet's premier destinations for more than 700 million users," she said in a statement. "I look forward to working with the company's dedicated employees to bring innovative products, content, and personalized experiences to users and advertisers all around the world."
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.
Mayer joined Google in 1999 as its 20th employee and helped lead the development of some of its flagship products, notably the company's search offerings. More recently, she has been involved in developing the Google's local, mapping, and location-services tools.
"Marissa is a well-known, visionary leader in user experience and product design and one of Silicon Valley's most exciting strategists in technology development," Yahoo! co-founder David Filo said in a statement. "I look forward to working with her to enhance Yahoo's product offerings for our over 700 million unique monthly visitors."
Fred Amoroso, Yahoo's chairman, said the board was drawn to Mayer's "unparalleled track record in technology, design, and product execution."
Yahoo's website remains among the most popular destinations on the Internet with 700 million monthly visitors, but the company has struggled to turn those visits into ad revenue growth. Yahoo's decline has been exacerbated by the success of Internet search leader Google and social networking leader Facebook Inc. (FB).
Levinsohn, 48, who once ran Internet services at News Corp. (NWSA), made a positive impression by closing a long-delayed deal to sell part of its stake in Alibaba Group, one of China's most successful Internet companies. He also negotiated a truce with Facebook, averting a legal fight over patent rights that threatened to poison Yahoo's partnerships with the social network.
Mayer, 37, will be Yahoo's fifth CEO in five years, not including two interim CEOs. She holds an M.S. degree in computer science from Stanford University, specializing in artificial intelligence. In May, she spoke with "CBS This Morning" co-hosts Gayle King and Charlie Rose about a new location-based social media service at Google.