The Polish side, led by new Romanian coach Edward Iordanescu, also won the first leg 1–0 in Warsaw last week and will now face Czech club Baník Ostrava in the next round.
Thursday’s return match in Aktobe was decided in stoppage time when Colombian midfielder Juergen Elitim finished off a late attacking move to seal the win for Legia.
Last week’s victory came courtesy of a spectacular goal from Armenian midfielder Wahan Bichakhchyan.
Legia also claimed Poland's Super Cup on Sunday with a 2–1 win over Lech Poznań, marking a strong start to the season under Iordanescu.
Legia travelled to Kazakhstan without Belarusian striker Ilya Shkurin, who declined to make the trip due to fears of persecution by Belarusian security services, Polish state news agency PAP reported.
Shkurin, who has publicly criticised Belarusian leader Alexander Lukashenko and avoided military service in his country, was replaced in the starting lineup by Spanish forward Marc Gual.
Legia will play the first leg against Baník Ostrava away on July 24, with the return fixture in Warsaw on July 31.
To reach the Europa League group stage, Legia must beat Baník and win two more qualifying rounds.
Legia, last season’s Polish Cup winners, entered European competition earlier than other Polish football clubs this season.
National champions Lech Poznań will enter the UEFA Champions League qualifiers in the second round, while Raków Częstochowa and Jagiellonia Białystok are set to join the UEFA Conference League qualifiers at the same stage.
Lech will face Iceland's Breidablik, Raków will play Slovakia’s MŠK Žilina, while Jagiellonia will take on Serbia’s FK Novi Pazar.
Second-round matches for the Champions League are scheduled for July 22–23 and July 29–30. Conference League matches involving Raków and Jagiellonia will be played on July 24 and 31.
(gs)
Source: IAR, PAP