Real Madrid marched on to the quarter finals of Copa Del Rey, despite losing 1-0 in the second leg tie of their last 16 tie on Wednesday night.
The host were faced with the task of making a comeback after suffering a 3-0 defeat in the first leg encounter last week.
With nothing to lose, Leganes came out strong and Martin Braithwaite broke the deadlock for Pellegrino’s men on the half-hour mark with a clinical finish inside the box after the visitors could not clear their line.
Los Blancos absorbed the pressure in the closing stages of the half, but were unable to force a save out of Leganes shot-stopper Pichu Cuéllar.
Solari made his first change at the start of the second half, taking off Sergio Reguilon for Dani Caballos, who scored the winner the last time out against Real Betis.
Meanwhile, Pellegrino made his first alteration in the 63rd minute, as Gerard Gumbau made way for former Barcelona man Jose Arnaiz.
The hosts had the momentum in the last quarter of an hour but they lacked the quality upfront to test goalkeeper Keylor Navas, while Los Blancos barely threatened the Leganes goal in the second stanza.
The remaining stages of the second half did not get any better for Leganes as the Los Blancos defence did well thwart every attack as the encounter ended 1-0, although the visitors advance after winning the tie 3-1 on aggregate.