Ahly managed to replicate their 2012 Champions League final scenario against Esperance, overcoming the Tunisians 2-1 in Rades to qualify for the competition's semis following last week's disappointing 2-2 first-leg draw in Alexandria.
Ahly, who went into the game eyeing an away victory to advance past Esperance, fell behind to a Taha Yassine Khenissi penalty in the 40th minute.
Hossam El-Badry's men, however, regrouped after the break and it took Tunisia full-back Ali Maaloul just five minutes to equalize before setting up himself substitute Junior Ajayi just 12 minutes later.
Ahly will now be facing the winner from the match between Tunisia's Etoile du Sahel and Libya's Ahli Tripoli, with the first leg having already ended in a goalless draw at the latter's ground.
Ahly showed determination in the opening stages, and winger Moemen Zakareya came close inside the second minute when he made an inroad down the right before seeing his eventual strike kept away by keeper Moaz Ben Cherifia.
As the match went on, the game started to grow into a scruffy contest – with the Ahly players in particular looking nervous on several occasions.
The hosts' threat was restricted to set-pieces though, with playmaker Ghilane Chaalali seeing a couple of long-range free-kicks go narrowly wide in the space of just four minutes.
Esperance looked the more composed side and were awarded a penalty after keeper Sherif Ekramy was adjudged by the ref to have fouled a through-on-goal Iheb M'barki following a blunder by full-back Maaloul.
Striker Khenissi, who also managed to score in Alexandria, successfully converted from the spot - smashing into the top corner to give his side the lead just five minutes from half-time.
Maaloul wins the tie
Just four minutes after the break, left-back Maaloul came to make amends for the goal conceded, prodding home at the far post after keeper Ben Cherifia failed to properly deal with a cross from the right.
With the hosts looking to press Ahly in advanced positions, spaces were inevitably left at the back, a fact that the Cairo giants did well to exploit two minutes after the hour-mark.
A counter-attack was led by Maaloul down the right, with the Tunisian's pin-point diagonal cross superbly headed by Ajayi past the keeper to make it 2-1.
After taking the lead, Ahly retreated in attempt to deny the home side spaces hit them on the break, after manager El-Badry had initially switched to a 4-4-2 format after the break with Ajayi and Walid Azaro deployed upfront.
The latter was particularly guilty of a glaring miss after breaking clear from the half-way line towards goal, as Ahly managed to hold onto their lead and qualify for the Champions League semis in dramatic fashion.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)