Substitute Vincent Aboubakar swept in the winner two minutes from time, flicking the ball over defender Ali Gabr and thumping it home.
Nicolas Nkoulou had earlier equalised for Cameroon, rising highest to power in a header on the hour mark.
The equaliser cancelled out Mohamed Elneny’s opener on 22 minutes with a beautifully taken near-post strike.
The wild celebrations for Aboubakar’s winner announced Cameroon’s return to the continental summit, after a 15-year wait.
It also makes them the second most successful nation in the competition’s history – behind Egypt – and marks the first time they have beaten the Pharaohs in the final in three attempts.
Besiktas striker Aboubakar ran towards the triumphant Cameroon fans in the Stade de l’Amitie stands in Libreville to celebrate, pursued by delirious team-mates and coaching staff.
Underdogs Cameroon had already upset the odds to reach the final and stunned the much-fancied Egyptians with a late dramatic strike, after fellow substitute Nkoulou had drawn them level(BBC,2017)