The teams were locked at 1-1 at the Cairo International Stadium when midfielder Magdi collected a loose ball 30 metres out, showed neat control under pressure and volleyed into the corner of the net.
It sparked wild scenes of celebration from the players, and might have been applauded by 100,000 fans in the stadium but instead was netted in front of empty stands.
The title win is a second for Ahly coach Pitso Mosimane after the South African led Mamelodi Sundowns to victory in 2016, when they also beat Zamalek in what was then a two-legged decider.
Friday’s match is the first time since the inaugural African Champions Cup final in 1965 that the final was a single game.
Ahly took an early lead when Amr Soleya headed an in-swinging corner. But Zamalek had grown more dominant and levelled thanks to a touch of magic from winger Shikabala.