King Mohammed VI discussed the issue with Chancellor Angela Merkel by telephone on Wednesday and asked Interior Minister Mohammed Hassad to head to Germany in the coming days to thrash out the details, a statement said.
"Morocco has undertaken to optimise and rationalise the management of the flow of migrants," it added.
Merkel has come under mounting domestic pressure to tackle illegal migration after an influx of nearly a million asylum-seekers last year.
A wave of sexual assaults by migrants on New Year's Eve outraged German public opinion. Around 30 of the 73 suspects arrested were Moroccan.
Speaking in Vienna last weekend, Merkel said Europe needed to secure more deals with third countries on the repatriation of migrants who do not qualify for asylum.
"It is necessary to get agreements with third countries, especially in Africa... so that it becomes clear that those with no right to stay in Europe can go back to their home countries," she said.
The Akhbar Al-Yom newspaper reported on Friday that the more than 10,000 repatriation cases were to be considered but the interior ministry said the figure was erroneous as no precise data existed.
Merkel accepted an invitation by the king to visit Morocco early next year, the palace said.