Mayer's hire brought to an end Yahoo's period without a leader following the resignation of Scott Thompson in May amid health issues and in the wake of a storm over inaccurate information on his CV.
Hiring someone with Mayer's background in software engineering 'signals a ren-ewed focus on product innovation to drive user experience and advertising revenue', according to Yahoo.
Mayer was Google's 20th employee and first female eng-ineer. She managed the launch of more than 100 products and features including image, book and product search, iGoogle, Google News and Gmail.
Mayer revealed on Twitter last week she was expecting her first child in October.