The UN High Commissioner for Refugees on Wednesday said it had evidence that numerous sub-Saharan Africans were being held in Morocco, many of whom could potentially be classified as international refugees.
The agency said it feared the migrants could be forcibly returned to a country where they may face persecution.
"We have been there over a week and we have made repeated requests," UNHCR spokesman Ron Redmond said.
Morocco's government has been sending African immigrants home by the hundreds on special flights in a bid to stop the continent's poor from using their nation as a stepping stone to a hoped-for better life in Europe.
While countries have a right to patrol their borders, people fleeing persecution and violence must be guaranteed proper asylum procedures, the agency said in a statement.
It urged the Moroccan government to allow it to interview detainees reportedly being held in various camps throughout the country.
Scores of migrants have been
sent back home by Morocco
Last week, a UN human rights expert called for a transparent and independent investigation into the deaths of 11 Africans as they tried to cross the borders between Morocco and the Spanish enclaves of Ceuta and Melilla.
The Paris-based aid group Medecins Sans Frontieres also reported that Morocco had dropped about 1000 people in the desert and left them there to walk for nearly a week. Morocco has denied this.
EU humanitarian aid chief Louis Michel has said the treatment of detained Africans in Morocco is "absolutely scandalous".
Europe needs to build closer ties with Algeria to help it stop illegal immigrants transiting the North African state on their way to the wealthy bloc, the European Commission said on Wednesday.
Migrants travel through Algeria to neighbouring Morocco and seek to enter the European Union through Spain's North African enclave Melilla on Rabat's Mediterranean coastline.
Morocco has blamed Algeria for failing to halt the influx of migrants from sub-Saharan Africa.
Eleven were killed as they tried
storming into Melilla and Ceuta
Eleven people were killed earlier this month as Moroccan and Spanish forces repelled their attempts to climb the fences barring the way into Melilla and its sister outpost Ceuta.
"The Commission should investigate the potential to assist Algeria in migration management without further delay," the Commission said in a report on a recent visit of officials to Morocco to investigate the problem.
"Algeria should be encouraged to increase its efforts in the management of its borders, including with Morocco and should be supported to this end as this issue is ... a joint responsibility," it said.
The EU should seek to start talks on a readmission agreement with Algeria for illegal immigrants, the Commission said.
It also urged Algiers to rescue migrants stranded in the desert. Brussels said 10 million euros could be available in funding.