Brendan Rodgers’ side have started the season inconsistently and now have work to do in Group C following a defeat to go with their 2-2 draw at Napoli in the opening game.
Azerbaijan national Mahir Emreli scored the only goal in the 31st minute, outmuscling Daniel Amartey on the edge of the box before firing in a low finish via the foot of the post.
Leicester lacked rhythm but did have chances with Ayoze Perez screwing wide in the first half after being put through by Patson Daka.
Centre-half Jannik Vestergaard had a golden opportunity to equalise in the second half, but his header from four yards out was somehow kept out by Legia goalkeeper Cezary Miszta’s stunning reflex save.
The group’s other game was a crazy affair, with Spartak Moscow edging Napoli 3-2 in a feisty match featuring 12 yellow cards and two reds.
Quincy Promes made it 3-1 in the 90th minute and although Victor Osimhen pulled one back for Napoli four minutes later, the Serie A side could not find a leveller with 11 minutes added on.
Last season’s FA Cup winners Leicester are yet to get going this term, winning just two of their opening six Premier League games and finding life difficult in Europe.
A worry for Rodgers will be the lack of a cutting edge in front of goal, firing in 18 shots during the contest, but unable to find the net.
Kelechi Iheanacho was ruled out because of travel document issues and top scorer Jamie Vardy was left on the bench so £22m summer signing Daka led the line.
The Zambian arrived with an eye-catching reputation having scored 27 goals in 28 games last term to lead Red Bull Salzburg to a fourth consecutive Austrian league title.
But he is yet to get off the mark for the Foxes, despite having more efforts at goal (5) than any other player.
A header lacked power and was comfortable for Miszta and Daka was then found with a chipped ball by James Maddison – introduced on the hour mark – but the frontman miscued from 12 yards out.
Desperate to try to break his duck, Daka shinned an overhead kick off target from a promising position, while Maddison had a shot cleared off the line late on.
As Leicester poured forward in search of an elusive equaliser, Legia had two presentable opportunities late in the game.
But Lirim Kastrati’s drive was pushed onto the post by Kasper Schmeichel’s outstretched leg and former Southampton loanee Tomas Pekhart side-footed wide with the goal gaping.