Yahoo owns a 40 percent stake in Chinese Internet firm Alibaba Group and the deal will see 20 percent of that holding sold back to the Group for $6.3bn (£3.98bn) in cash and up to $800m of Alibaba 'preference' shares.
Alibaba is reportedly raising $2.3bn in cash from its other shareholders to finance the deal.
The transaction is expected to close within approximately six months.
The companies have also agreed to amend their existing technology and intellectual property licensing agreement. The share buyback deal allows Yahoo to make other investments in other Chinese companies for the first time and licenses the Yahoo internet brand to Alibaba for four years, at a cost of $550m per year.
In an official statement Yahoo said "substantially all" of the money raised by the sale will be given back to Yahoo investors and that should help quiet some of the anger that shareholders felt after Yahoo turned down a buyout bid from Microsoft.
Microsoft offered $33 per share in 2008, which valued Yahoo at $47.5bn. Yahoo's stock currently trades at around the $15.
Founded in 1999 in Hangzhou, China, Alibaba.com is made up of three separate marketplaces. The global trade platform Alibaba.com serves importers and exporters; the Chinese platform 1688.com handles domestic trade in China; while the transaction-based wholesale platform Aliexpress.com is geared towards smaller buyers seeking fast shipment of small quantities of goods.
The three online outlets serve more than 79.7 million registered users in more than 240 countries and regions.
The Alibaba.com web portal completed a $1.7bn initial public offering on the Hong Kong Stock Exchange in November 2007. The Yahoo buyback deal could be the next step towards a full public listing for Alibaba Group and Yahoo has agreed to sell back at least another 10 percent of its shares to Alibaba for that to take place.