The win made Al Ahly progress 4-3 on aggregate after they were held to a 2-2 draw by Esperance in the first leg in Egypt.
After both teams failed to break the deadlock in the early exchanges, it was Esperance who eventually took the lead in the 40th minute through Taha Yassine.
In the 50th minute, Al Ahly equalised thanks to Tunisia’s Ali Maaloul.
And in the 62nd minute Maaloul turned provider as his superb cross was headed in by Ajayi to give Al Ahly the win.
Al Ahly will now meet the winners between Etoile du Sahel of Tunisia and Libya’s Ahli Tripoli in the semi-finals.