Curtis Jones scored twice, while Dominic Soboslai, Cody Gakpo and Mohamed Salah scored in a mostly one-sided match at Anfield.
Jarrod Bowen scored a consolation goal for West Ham.
Liverpool will play Fulham in the semi-finals, while second-division Middlesbrough face Chelsea.
Performance, score, result and individual performances together created the team on the pitch, Liverpool manager Jurgen Klopp said. ‘We were brave in positioning, our second-ball play was exceptional. It was a very, very good performance from start to finishin the 28th minute. The hosts pressurize Polanogi from a narrow angle on the left.
Gakpo made the score 3-0 in the 71st minute with a low shot from the edge of the box that hit the bottom corner.
Six minutes later, Bowen equalized a goal for West Ham when he rounded Jarell Quans in the penalty area and fired a right-footed shot past Kaoimhin Kelleher.
Liverpool should have restored their three-goal advantage when
The latest news from the world of football – https://worldoffootball.in/