Monastir lost 1-0 away in the first leg of the competition's first preliminary round but stormed back in the return leg to go through with a 3-1 aggregate win.
Zied Aloui gave the Tunisians a fifth-minute lead and Houssem Tka doubled their advantage on 28 minutes.
Youssouf Oumarou made it 3-0 eight minutes after the hour-mark to confirm his side's qualification for the next round.
Monastir came agonisingly close to winning the Tunisian league title last season only to fall at the last hurdle and finish as runners-up to Esperance.
The team is managed by Serbian coach Darko Novic, who replaced Fawzi Benzarti last summer.
Monastir will host Ahly in the second week of October in the first-leg before facing them again one week later in Cairo.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)
Short link: