It was a thrilling final at Ahmadou Ahidjo Stadium in Yaounde on Sunday night.
Two second-half headers by Abdelmouna Boutouil and captain Ayoub El Kaabi sealed the victory for the Atlas Lions.
This handed the North Africans their second consecutive title in Cameroon.
The Atlas Lions repeated the success on home soil three years ago by a margin that hardly looked possible.
The Eagles had stood toe-to-toe with the favourites for over an hour.
Houcine Ammouta’s side became the first country to win a second successive title in the tournament designed exclusively for home-based players.
In one of the most exciting CHAN finals of the modern era, played out to a soundtrack of African drums.
Mali and Morocco delivered an enthralling spectacle that brought delight to football enthusiasts in the continent over the quality on display.
Little separated the two sides in a well-contested first 15 minutes which lacked attacking display.
But El Kaabi ‘s header from a free-kick flashed across the face of the Mali goal.
Mali goalkeeper Djugui Diarra partly saved a tricky free-kick taken by Soufiane Rahimi from the edge of the box.
But defender Yacouba Doumbia cleared the danger.
The West Africans were not overawed by the situation and took advantage of the large space on the right side.
The Eagles should have opened the scoring when Mousaa Kone beat the Moroccan offside trap from the right side of the Morocco defence.
But goalkeeper Anas Zniti was quick off his mark to prevent the Stade Malien striker.
Mali grew in confidence and moments later talented playmaker Demba Diallo broke free after dispossessing Namsaoui.
But he fired over the bar from 20 yards as they continued to pile the pressure on the North Africans.