Upvote:1
You would need a transit visa, as your two carriers, Air Maroc and Emirates, are not partner airlines and you would have to collect and re-check your baggage for your onward flight.
According to Timatic, the tool used by airlines to check document requirements (and courtesy of Emirates):
Transit - Morocco (MA) Visa required.
Visa Exemptions: TWOV (Transit Without Visa):
Passengers with a confirmed onward ticket for a flight to a third country on the same calendar day. They must stay in the international transit area of the airport and have documents required for the next destination.
Resources: