However, the Hammers made sure of the points late on when Morgan Amalfitano came off the bench to find the net.
Here, Sports Mole takes a closer look at the action between the two teams at Upton Park.
On target: 7
On target: 5
Was the result fair?
Despite Liverpool's resurgence in the second half, it is hard to argue against West Ham coming away with the spoils. The Hammers got off to a blistering start and showed plenty of composure, organisation and control before sealing the victory late on. Meanwhile, Liverpool were well below their usual standards under Brendan Rodgers.
West Ham's performance
Sam Allardyce is sure to be delighted with his players after they put in a spirited display against Liverpool. Two goals early on settled any nerves, and the Hammers were able to use their lead to keep their opponents at arm's length. The hosts were well drilled, compact and dogged throughout, though they also attacked with speed, imagination and flair. They also earned their corn in defence as Liverpool cranked up the pressure in the second half. Winston Reid and James Tomkins in particular were superb for the home side, helping to keep the visitors out as the match went on. There always seems to be a pendulous sway of opinion when it comes to the West Ham fans and Allardyce, but this result and performance will certainly give him quite a few brownie points.
There were questions before the match about whether Liverpool would be able to cope with the demands of playing in the Champions League this season. Following this display, it looks as if Rodgers might have a job on his hands in terms of keeping his players fit and focused. The Reds were abject for large periods at Upton Park, defending like amateurs and attacking without ideas. They enjoyed a decent spell of possession in the second half, but they rarely did anything meaningful with the ball. Furthermore, the absence of Daniel Sturridge was glaring as they huffed and puffed in search of an equaliser. A disappointing evening all round for the Merseysiders.
Sports Mole's man of the match
Enner Valencia: West Ham's new striker gave it his all against Liverpool, running tirelessly and providing an attacking threat whenever he could. The Ecuadorian also put himself about a fair bit, giving the likes of Dejan Lovren and Martin Skrtel a tough evening.
Liverpool's performance was littered with errors, but the most costly was Mamadou Sakho's wayward header in the build-up to West Ham's last goal. The defender gave the ball away needlessly to Stewart Downing, who went on to set up Amalfitano to make it 3-1. Kamikaze defending.
Craig Pawson had to use his authority on more than one occasion as the game boiled over now and then, but the official handled both teams well on a competitive evening. That said, the man in the middle was not afraid to get out his yellow card, brandishing it five times in total.
West Ham: The Hammers are back in action next Saturday when they travel to Old Trafford to face Manchester United.
Liverpool: The Merseysiders start their League Cup campaign on Tuesday at home to Middlesbrough in the third round.