The deputy chairman of the African Union Commission, Kwesi Quartey, has tweeted that the Union has agreed to evacuate some 15,000 African migrants in Libya before the end of year.
He added that the repatriations would be voluntary, and would be done in partnership with the International Organisation for Migration.
At least 20,000 migrants are being held in government detention centres in Libya.
The move follows reports that migrants are being sold in slave markets in the North African state, sparking global outrage.
An urgent evacuation plan for migrants in Libyan detention camps was drawn at an AU-EU summit in Ivory Coast last week.