Developed countries agreed to stop the subsidies immediately and developing nations must follow by the end of 2018. The WTO, which represents 162 countries, called it "the most significant outcome on agriculture" since the body's foundation in 1995. But longstanding talks on other trade barriers were left unresolved at the end of the summit in Kenya.
Removing agriculture export subsidies is intended to help farmers in poorer countries to compete more fairly.
"The decision you have taken today on export competition is truly extraordinary," WTO chief Roberto Azevedo said at the closing session in Kenyan capital, Nairobi.
The summit of ministers, which finished on Saturday after five days of talks, was the first to be held in Africa.
Doha deadlock
The WTO called the farming agreement "historic", while the European Commission said it would be "good for fairer trade".
"For those who had doubts, it proves the relevance of the WTO and its capacity to deliver results," EU Trade Commissioner Cecilia Malmstrom said.
Kenya's Foreign Minister Amina Mohamed said the summit would be "remembered as having made that leap" from a time when the WTO was divided along a "developed and developing divide".
It follows a WTO deal in July to cut tariffs on $1.3trn (£833bn) worth of technology products.
But the body had been under pressure in Nairobi to remove other trade barriers after discussions had stalled in recent years.
The lack of progress in the ongoing Doha Round of talks, which first started in the Qatari capital in 2001, had led some countries to seek agreements among smaller groups.
Doha's goals included increased duty-free access for developing countries; lower tariffs on agricultural products, textiles and clothing; and the reduction of trade-distorting subsidies from developed countries.
The final declaration adopted in Nairobi said "many members" reaffirmed their "full commitment to conclude" the Doha Development Agenda goals.
But it added: "Other members do not reaffirm the Doha mandates, as they believe new approaches are necessary to achieve meaningful outcomes in multilateral negotiations."
Two new countries, Afghanistan and Liberia, were accepted into the WTO at the summit and will formally join in the coming weeks.
UAC Information Center by BBC