Holders Real Madrid edged towards the last 16 of the Champions League, but disturbances between visiting Polish ultras and the police marred their 5-1 win at the Santiago Bernabeu on Tuesday.
Five fans and two police officers were treated for minor injuries after clashes outside the stadium before kick-off.
UEFA had already ordered the return match between the sides in two weeks' time be played behind closed doors due to violence and racist abuse in Legia's opening 6-0 defeat in Group F to Borussia Dortmund last month.
"Legia is a team with tradition and deserves to play in front of a full stadium," said Legia coach Jacek Magiera.
"These incidents reflect negatively on us and we have to ensure they don't happen again."
playLegia Warszawa's goalkeeper Arkadiusz Malarz stops a shot by Real Madrid at the Santiago Bernabeu stadium in Madrid on October 18, 2016 (AFP)