Although Leganes, who are currently second from bottom of the Liga Santander, helped the Barca cause with a display that implied they were more interested in their weekend league game than the last eight of the cup, Setien's side looked more direct than in their previous three games, with Leo Messi once again their most decisive player, reports Xinhua news agency.
Setien switched his system from his preferred 3-1-4-2 to a more conventional 4-3-3, which suited full backs Nelson Semedo and Jordi Alba far more than the previous system.
Antoine Griezmann opened the scoring in the fourth minute after finishing a pass from Semedo, who had been put into space by Leo Messi. Although Leganes produced a timid reaction, Barca doubled their lead when Clement Lenglet flicked home a Messi corner midway through the first half.
The second half saw Barca control the ball and although they were moving it slowly Messi assured the win in the 59th minute after taking a pass from Frenkie de Jong. Arthur Melo added a fourth, sliding the ball home after Leganes keeper Pichu Cuellar saved from Ansu Fati and Messi's shot was then cleared off the line.
Messi got his second goal off the night in the penultimate minute after being put through by Ivan Rakitic to seal a result that should calm some nerves at the club, at least until the weekend.
Barca join Athletic Club, Real Sociedad, Real Madrid, Valencia, Villarreal and Granada in Friday's tough looking quarter-final draw with the last place going to the winner of Thursday's late kick off between Mirandes and Sevilla.
( With inputs from IANS )