AGF's name was pulled out of the bowl to face Polish champions Lech Poznan when the draw was made at the headquarters of the European Football Association (UEFA) in Nyon, Switzerland, on Wednesday.
The Danish champion team were unseeded in the draw, and the Polish champion team was among the toughest options in the bowl.
Under Danish head coach Niels Frederiksen, Lech Poznan became champion last season for the second successive time and the tenth time in history.
AGF became Danish champion for the first time in 40 years. Jacob Poulsen's men will play the first match at home on 21 or 22 July, and the return match will be played in Poland on 28 or 29 July.
AGF must win three ties in the qualification to reach the very lucrative league phase in the Champions League.
Should AGF lose against Lech Poznan, another chance awaits in the Europa League qualification.
