The agreement includes the expansion of Yahoo!'s board, which will grow from nine directors to 11 in order to include two of Icahn's supporters.
Icahn has now dropped his campaign to force the replacement of the Yahoo! board at its shareholder meeting on August 1.
The two sides have agreed that Icahn will replace current director Robert Kotick. The rest of the existing directors will stand for re-election and the two new directors will be chosen from a list that includes Icahn's eight nominees and Jonathan Miller, former chairman and chief executive of AOL.
The surprise development ends a period of outright war between the company and Icahn, who owns 5% of its shares.
Icahn has now toned down his calls for Yahoo! to agree to sell itself or its search business Microsoft.
He said: "While I continue to believe that the sale of the whole company or the sale of its search business in the right transaction must be given full consideration, I share the view that Yahoo!'s valuable collection of assets positions it well to continue expanding its online leadership and enhancing returns to stockholders.
"I am happy that the board has agreed in the settlement agreement that any meaningful transaction, including the strategy in dealing with that transaction, will be fully discussed with the entire board before any final decision is made."
The development follows the public statement by one of Yahoo!'s biggest shareholders, mutual fund manager Legg Mason, that it was likely to vote in favour of Yahoo!'s board at the shareholder meeting.
Jerry Yang, chief executive of Yahoo!, said the deal would help Yahoo!.
"This agreement will not only allow Yahoo! to put the distraction of the proxy contest behind us, it will allow the company to continue pursuing its strategy of being the starting point for internet users and a must-buy for advertisers."