Nigerian striker
Al Ahly could only play out a 2-2 draw at home in Cairo a fortnight ago and needed a win to scale through to the semi-final.
On Saturday night in Rades, Esperance took the lead in front of a 60,000 capacity stadium from the penalty spot in the 40th-minute.
Al Ahly equalised through Tunisian defender Ali Maaloul just immediately after the restart.
Buoyed by their home fans, Esperance turned on the pressure in search of a winner but it was Nigerian striker Ajayi that had the final say for Al Ahly.
The former Nigeria U-23 player scored after a brilliant counter-attacking move by Al Ahly to send the visitors to the semi-finals.
This season, Ajayi has already won the domestic double with Al Ahly and will be hoping to add a CAF Champions League title.