Barca were joined by underdogs Mirandes in the last eight after the second tier team stunned La Liga high-fliers Sevilla 3-1 in Thursday’s final last-16 tie.
A Lionel Messi-inspired Barcelona eased past Leganes 5-0 on Thursday to reach the Copa del Rey quarter-finals.
Leganes, second-bottom of La Liga, made a number of changes from the side that secured a 0-0 draw against Atletico Madrid at the weekend and a full-strength Barca took advantage.
Last season's Copa runners-up went ahead after four minutes when Nelson Semedo raced onto Messi's through ball and squared for Antoine Griezmann to finish from close range.
Griezmann was denied a second after a lengthy VAR stoppage deemed the French forward offside in the build-up.
Messi turned provider when Clement Lenglet nodded in from a corner to double the Catalan side's advantage.
The Argentine added a deflected third on the hour before rounding off the scoring in the final minute after substitute Arthur had netted the fourth.
Barca were joined by underdogs Mirandes in the last eight after the second tier team stunned La Liga high-fliers Sevilla 3-1 in Thursday's final last-16 tie.
Real Madrid, Villarreal, Athletic Bilbao, Granada, Real Sociedad and holders Valencia are the other sides in Friday's draw.