Michał Kucharczyk scored the only goal of the match at Turners Cross Stadium in the southwestern Irish city of Cork in the 79th minute as the two sides began their European campaign on Tuesday.
Legia Warsaw play Cork City in the second leg next Tuesday, July 17, in Warsaw, with kick-off at 9 pm.
The winner of the two matches will go on to face either Slovak side Spartak Trnava or Bosnia and Herzegovina’s Zrinjski Mostar in the second round of Champions League qualifiers.
The loser will be relegated to the lower Europa League, but will be granted a bye into the third round of qualifiers of the latter.
To qualify for the Champions League group stage, Legia need to eliminate Irish champions Cork City and three other rivals, Polands PAP news agency has reported.
Legia in May won the Polish premier league championship for the third time in a row.
The Polish side qualified for the group stage of the 2016/2017 Champions League and drew 3-3 with Spains Real Madrid in November 2016.
Legia later that month lost 4-8 to German side Borussia Dortmund in the highest scoring match in Champions League history.
Source: PAP, sportowefakty.wp.pl