The ministers agreed by a large majority to the plan, with four EU members voting against.
The UN and other international organisations warned it was the "last chance" for increasingly overwhelmed European states to agree on how to cope with the tide of people fleeing conflict in countries like Syria and Afghanistan.
Luxembourg's Foreign Minister Jean Asselborn, who was chairing the meeting, said: "We have a text on the table which should deliver an agreement. It is very balanced. I think it will have a good influence on all the delegations so we can reach a result this evening."
But central and eastern European states strongly resisted plans to force EU member countries to take a share of the new arrivals from front-line nations.
"I want to confirm that both the interior minister and myself... will unequivocally reject any effort to introduce a permanent mechanism of refugee redistribution," Czech Prime Minister Sobotka told reporters in Prague.
"We also reject the introduction of quotas," he added.
The deal could be ratified by European Union leaders at a crisis summit on Wednesday, which will focus on wider issues of strengthening the bloc's external borders.
Tensions have kept boiling over, with fears that the EU's Schengen passport-free zone could be under threat from the tide of migrants, many of whom are trying to make their way to Germany.
German Interior Minister Thomas de Maziere, whose country is set to take in around one million asylum seekers this year, previously said he was "optimistic" that they could reach a deal but warned that the talks would be difficult.
"In the end I am optimistic but it's not done yet," he said.
EU Migration Commissioner Dimitris Avramopoulos said the bloc faced an "existential crisis".
The UN refugee agency, UNHCR, warned that the talks could be the "last opportunity" for a united response to a crisis it said was becoming more and more "chaotic and unpredictable" and was increasing tensions between European countries.
On the eve of the talks, UN chief Ban Ki-moon urged leaders across the EU to "show leadership and compassion" as the continent grapples with the unrelenting wave of migrants, many of them refugees like Abdullah, a 35-year-old Syrian father of two from war-ravaged Aleppo.
"We have no choice but to leave. We are dying here every day," he told AFP in Istanbul where he has worked odd jobs for three years to save money for a journey across Europe he hopes to make soon.
More than half a million people have already braved dangerous sea crossings and arduous land treks to make it into Europe this year, heaping pressure on countries along the migrant trail, some of which have closed their borders while others have diverted the flow elsewhere.
Some 2,800 people have died this year trying to cross the Mediterranean in flimsy boats.
Top diplomats from Hungary, Poland, Slovakia and the Czech Republic, all of whom have rejected the EU proposal for binding refugee quotas, met in Prague on Monday with their counterpart from Luxembourg, which holds the EU presidency.
The European Commission has proposed binding quotas for 22 member states to take in 120,000 refugees: 54,000 asylum seekers from Hungary, 50,400 from Greece and 15,600 from Italy.
Sources in Brussels said the EU ministers were considering a watered-down plan that would drop binding quotas and leave Hungary out of the scheme, as it refuses to be part of it.
There were suggestions that some could now be relocated from Germany instead, or additional numbers from Greece and Italy, the sources said.
Budapest has taken the toughest stance on the crisis, erecting razor-wire barriers along its borders with Serbia and Croatia in a bid to keep migrants out and enacting new laws to jail illegal migrants.
On Monday, lawmakers voted to give troops at Hungary's borders the right to use rubber bullets, tear gas and net guns - devices that fire netting to entangle the target - in a non-lethal way "unless it cannot be avoided".
German rail operator Deutsche Bahn meanwhile said it would suspend key services to and from Austria and Hungary until October 4th, citing border controls introduced to manage a record migrant influx.
Meanwhile Croatia's prime minister urged non-EU Serbia to restart directing migrants towards Hungary and Romania to help ease the burden on his country after it dealt with a surge in numbers this week.
Greek Prime Minister Alexis Tsipras, whose country is one of the main landing points for refugees crossing the Mediterranean, meanwhile called for responsibility to be shared, saying "otherwise there is no point in talking about a united Europe".
But debt-hit Greece is itself likely to face pressure at the emergency summit on Wednesday to accept further EU aid to manage its borders, in a move that could raise concerns in Athens over national sovereignty.