Captain Adil Habil scored the winner two minutes from time to stun favourites Egypt and cap their fairy-tale run at the championship with the ultimate.
The Moroccans came from behind twice in the hotly contested game that witnessed four goals in the first half.
The lead will last for a minute before Mohamed Jouad restored parity, cutting short the celebrations of the Egyptians.
The Pharaohs survived a scare from the Moroccans after Youness El Asas saw his goal-bound shot rattle the post with Ibrahim Mohamed completely beaten.
Eid fired Egypt into the lead for the second time from yet another counter attack on 18 minutes but Bilal Bakkali equalized just before the break.
The second half was a balanced affair with both sides making clear their intent for the winner.
And it was Morocco who had the last laugh grabbing the decisive goal courtesy Habil two minutes from time to settle matters.
Newly crowned champions, Morocco, Egypt and Mozambique will represent Africa at the 2016 FIFA Futsal World Cup scheduled for 10 September to 1 October in Colombia.
1 – Morocco
2 – Egypt
3 – Mozambique
Fair Play trophy
Ricardo Lenio Mendes Muendane (Mozambique) – 10 goals