A spokesperson for Tunisia's interior ministry said migrants were transferred to reception centres and provided with health and psychological care, with the help of the Tunisian Red Crescent.
Tunisia and Libya announced on Thursday an agreement to share responsibility for providing shelter for hundreds of migrants stranded at their border.
The migrants, mainly from sub-Saharan African countries, had been driven to the desert area of Ras Jedir by Tunisian authorities and left there to fend for themselves, according to witnesses, rights groups and UN agencies.
Aid groups said hundreds of migrants from sub-Saharan African countries remain stranded there in life-threatening conditions.
A spokesman for Tunisia's interior ministry, Faker Bouzghaya, said during a joint meeting with Libyan authorities in Tunis that "we have agreed to share the groups of migrants who are at the border."
He said the groups were transferred on Wednesday to reception centres in the cities of Tatouine and Medenine and provided with health and psychological care, with the help of the Tunisian Red Crescent.
Under the agreement, Libya will take in the remaining 150-200 migrants, humanitarian sources said.
The Libyan interior ministry earlier on Thursday announced the bilateral agreement to "put an end to the crisis of irregular migrants stranded in the border area".
In a later statement, it said there were no more migrants stranded at the border following the agreement, adding that joint patrols were being organised to "secure the border".
Racial tensions had flared in Tunisia's second city of Sfax after the 3 July killing of a Tunisian man following an altercation with migrants.
Up to 1,200 Africans were "expelled, or forcibly transferred by Tunisian security forces" to desert border regions with Libya and Algeria, Human Rights Watch said.
Until Wednesday, around 50 migrants per day had continued to arrive in Libya at Al-Assah before being rescued by Libyan guards, according to reports from a humanitarian worker.
Libyan authorities have come under sharp criticism by the UN over reported violence against migrants, about 600,000 of whom reside in the war-scarred North African country.
The two North African countries are major gateways for migrants and asylum seekers attempting perilous voyages in often rickety boats in the hopes of a better life in Europe.
The United Nations has described the central Mediterranean migration route as the world's deadliest, claiming hundreds of lives each year.
More than 1,800 people have died attempting the route so far this year, according to figures released by the International Organization for Migration.