The Egyptian outfit trailed 1-0 after the first leg of the second-round clash, but pulled themselves level in the tie when Mohamed Naguib found the net in the 40th minute.
But they were pegged back two minutes later when Abdelrahman Fetori scored from the spot, leaving Al Ahly needing to score two to go through.
However, further strikes from Farag Abdel-Hafiz and Moataz El Mahdy before the hour mark ended Al Ahly's hopes of reaching the group stage, although Amr Gamal scored a late consolation.
Kaizer Chiefs' hopes of winning a treble ended as they fell to a 3-2 aggregate defeat against AS Vita Club.
Knowledge Musona and Morgan Gould sealed a 2-0 victory on the day, but it was not enough to undo the damage that had already been done in the first leg.
TP Mazembe, who are four-time winners of Africa's premier club competition, had to rely on the away goals rule to seal their progression.
The side from the Democratic Republic of Congo trailed 2-1 from the first leg, but Mbwana Samatta's 66th-minute goal was enough to send them through at the expense of Sewe Sport.
In the day's remaining second-leg clash, Sfaxien - current holders of the CAF Confederation Cup - were 2-0 winners against Horoya, contributing to a 3-0 aggregate win.
The round's remaining second-leg ties take place on Sunday.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.