The 31-year-old midfielder struck in the first minute of the second half in Cairo as the record 11-time African champions clinched first place in Group D.
A clever pass set Ali Maaloul free down the left wing and his cutback was fired past Young Africans goalkeeper Djibril Diarra by El Shahat.
It was the fifth goal of the Champions League campaign for the Egyptian international, who also scored the only goal last weekend in an away victory over Medeama of Ghana.
Defending champions Ahly finished the six-round mini-league phase unbeaten with 12 points, Young Africans and Chabab Belouizdad of Algeria secured eight each and Medeama four.
Young Africans will join Ahly in the quarter-finals having pipped Belouizdad on a head-to-head tie-breaker. The Tanzanians won 4-0 at home and lost 3-0 away to the Algerians.
Ahly will be making a 21st appearance in the Champions League knockout phase since the name and format of the competition were changed in 1997.
Young Africans have never previously gone beyond the group stage, and exceeded expectations by doing so at the expense of Belouizdad, quarter-finalists in the past three editions.
If fellow Dar es Salaam club Simba win at home against Jwaneng Galaxy of Botswana on Saturday, Tanzania will be the only country with two quarter-finalists this season.
Cameroonian Leonel Wamba scored his first Champions League goal since last October as Belouizdad outplayed Medeama 3-0 in a dead rubber in Algiers.
Abdelraouf Benguit gave the home team a 27th-minute lead, Wamba netted three minutes before half-time and a volley from Gambian Lamin Jallow completed the scoring on 84 minutes.