The goal medal in the tournament is the second by the North African country after the victory in 2011.
The win was decided by penalty shootouts after both teams ended the first two halves 1-1.
Sofiane Kiyine gave the lead to the Moroccan side in the seventh minute but Côte d’Ivoire came back in 63th minute with the equalizer from Thierry Kassy’s chest.
Morocco overcame the games host with 7 shoots against 6.
Mali, which came with its African reigning under 17 national team finished 3rd beating DR Congo 2-1 in the tournament which started July 21 and saw participation of 16 national teams under 20.