Madrid entered the match missing several key players – among them, Ballon d’Or winner Karim Benzema and Thibaut Courtois – and quickly found themselves in a close contest with the Egyptian champions.
Al Ahly forced backup goalkeeper Andriy Lunin into action early and often in front of a near-capacity crowd at Prince Moulay Abdellah Stadium, but entered the break trailing after an error from Mahmoud Metwaly.
The 30-year-old centre-back could not deal with Aliou Dieng’s wayward header, his outstretched leg failing to meet the ball and allowing Vinicius clean through on goal against an onrushing Mohamed El Shenawy.
Vinicius’ chipped effort three minutes from half-time forced Marcel Koller to alter his team talk, and his task was made all the more difficult when Federico Valverde doubled the deficit two minutes after the restart.
Los Blancos looked to be in control as the second half wore on, that was until makeshift left-back Eduardo Camavinga fouled Hussein El Shahat inside the box.
Ali Maaloul’s converted spot-kick encouraged the Cairo club to press on in search of an equaliser, and while El Shenawy denied Luka Modric from scoring a penalty of his own, it never came.
Instead, Rodrygo and substitute Sergio Arribas both found the back of the net in stoppage time to seal the victory and set up a final with Asian champions Al Hilal on Sunday.