After a 0-0 first half, Ajayi opened the scoring for Ahly in the 61st minute.
With four minutes remaining substitut, Marwan Mohsen doubled Ahly’s lead.
Tanta pulled a goal back in the 90th minute through Mohamed Gaber which was just a consolation goal.
The win took Ahly to 78 points while Tanta are third from bottom on 26 points in the 18-team league table.
Ajayi has now taken his goal tally for the season to nine in Ahly’s colours.
The Rio 2016 Olympic bronze medal winner made his Super Eagles debut when he was introduced as a second half substitute in the 2-0 friendly defeat to Serbia on March 27 in London.