Under the new partnership agreement, Yahoo will use Microsoft's own search engine Bing on its sites while the companies will share search-related advertising revenue. 88 percent of the revenue from all search ad sales will stay with Yahoo for the first five years of the deal.
"This agreement comes with boatloads of value for Yahoo, our users, and the industry," Yahoo CEO Carol Bartz said in a statement.
"And I believe it establishes the foundation for a new era of Internet innovation and development."
Yahoo said it could gain as much as $500 million in annual operating income and some $200 million in capital expenditure savings through the deal.
Microsoft hopes to boost Bing search engine
Microsoft expects the new partnership will boost its search engine Bing against the overwhelming online presence of Google, allowing Microsoft to introduce Bing to more people.
"Through this agreement with Yahoo, we will create more innovation in search, better value for advertisers, and real consumer choice in a market currently dominated by a single company," Microsoft chief executive Steve Ballmer said.
In the US, Google controls around 65 percent of the internet search market while Yahoo is ranked second with 19.6 percent. Microsoft comes third with 8.4 percent.
The agreement concludes years of back and forth negotiations between the two companies. Only last year Microsoft almost bought Yahoo! but the move was called off at the last minute by then Yahoo chief Jerry Yang, who has in the meantime resigned following mounting criticism over his resistance to Microsoft.
Editor: Neil King