Angelo Ogbonna’s extra-time header made all the difference as the hammers made it to the next round leaving the Reds in a bad situation.
West Ham had gone ahead just before half time when Michail Antonio guided in Enner Valencia’s cross at the far post.
The Reds levelled almost immediately after the break when Philippe Coutinho’s low free-kick went under the West Ham backline.
With the match headed for a tie and after both sides were denied by the post, Ogbonna made it count for the Hammers as he rose to head home Dimitri Payet’s free kick and with it left the home fans overjoyed.
West Ham will play Championship side Blackburn Rovers in the fifth round to be played on February 21.
Coming into the match, the Hammers manager Slaven Bilic had expressed his desire to win the FA Cup and he showed his seriousness by lining up a full strength squad against the Reds.
Liverpool on the other hand struggling with injuries made a host of changes to their squad which played against Sunderland in Saturday’s Premier League draw.
Even then, it was an evenly balanced affair and both sides missed clear cut chances in a high tempo fixture.
Liverpool forward Christian Benteke who has been criticised this season for his poor form was at it again missed three clear chances for the Reds in extra time.
In the end however, Ogbonna proved the saviour for West Ham rising to score his first goal for the Hammers and with it send them to the next round from where they can plot their path to some silverware this season.
West Ham have won the FA Cup three times. The last time this happened was in 1980 when Trevor Brookings scored to help them win the title.