The deal also establishes a roadmap for lifting visa requirements for Turks travelling to the EU. Visa-free status is expected in three years' time.
Turkey is a major transit country for Asians and Africans heading for the EU.
Ankara has set up special camps for thousands of Syrian refugees, but other migrants often face great hardship.
Greece, where migrant reception centres are overcrowded, stepped up security on its land border with Turkey in August 2012.
But the EU border agency Frontex says in its 2013 risk analysis report that detections of illegal migrants on boats in the Aegean Sea, between Turkey and Greece, increased by 912% later that year.
In the past, human rights organisations, including the UN refugee agency UNHCR, have strongly criticised Greece and Italy for "push-backs" - a policy of sending migrants back to their point of departure.
Source: Frontex
Under international law, groups of migrants are supposed to be checked for legitimate asylum claims.
Bulgaria, an EU member, has struggled to cope with large numbers of irregular migrants - especially Syrians - arriving from Turkey.
Bulgaria is not in the EU's Schengen passport-free zone, where border checks are minimal, but Greece is.
Ketty Kehayioylou of the UNHCR in Greece said migrants were taking more dangerous routes since the land border with Turkey was fenced off last year.
The situation of Syrian refugees remains precarious in Greece, she told the BBC.
Unlike other migrants, Syrians are now given a six-month suspension of deportation. But that temporary permit does not entitle them to such things as a place stay, food or medical assistance, she said.
Turkey's Prime Minister Recep Tayyip Erdogan called the new deal with the EU a "milestone".
Mr Erdogan said Turkey was no longer a country that people "escape from, but one that people return to".
"We are not a country that is a burden [to the EU] but one that takes away its burdens," he said.
"The visa requirements should have been removed long ago. The fact that they haven't been removed yet has only harmed the European Union."
Turkey wants to join the EU and negotiations began in 2005, but progress has been slow, amid EU concern about human rights abuses. Turkey is carrying out various judicial reforms in an effort to meet EU standards.
EU leaders complained about the Turkish police crackdown on anti-government protesters in June, and Turkey's long-running dispute with Cyprus has also been a stumbling block. Turkey's EU accession negotiations resumed last month.
Two years of talks led up to the migrants/visa deal.
Turkey's Hurriyet newspaper says they narrowed their differences only after Ankara was assured that it could suspend the readmission agreement in the event that an EU member country blocked visa-free travel for Turkish citizens.
Turkey and the EU have signed a deal enabling EU countries to send back illegal migrants who entered the 28-nation bloc via Turkey.