The match kicks off at 8 p.m. in Poznań, western Poland, with the second leg due to take place next week in Azerbaijan.
The winner of the two matches will go on to face Swiss side FC Zürich in the second round of Champions League qualifiers, Polish state news agency PAP has reported.
The loser will be relegated to the lower Europa League.
To qualify for the Champions League group stage, Lech Poznań need to eliminate Qarabag Agdam, FC Zürich and two other rivals.
Lech in May won the Polish premier league championship for the eighth time.
(gs)
Source: PAP