Teddy Sheringham's late free-kick claimed the points for West Ham as they ended Sheffield United's three-match winning streak.
Marlon Harewood gave the much-changed visitors an early lead with a rocket of a shot into the top corner for his third goal of the season.
Alan Quinn levelled for the Blades in the second half with a swirling free-kick conceded by Adam Nowland.
But Quinn conceded the vital free-kick which Sheringham shot home to win it.
Sheffield United boss Neil Warnock on West Ham's winner:
"It was a bit unlucky with the deflected free-kick from Sheringham," he said.
"I didn't even think it was a free-kick.
"I thought we were poor in the first half, but then we did what we had to do and got them on the back foot.
"I was very pleased with the performance and didn't think we deserved to lose."
West Ham manager Alan Pardew on his new-look team:
"We've got real competition throughout the squad," he said.
"I'm under no pressure now to sell anyone and we've got a squad definitely capable of winning this league.
"I'm a lot more comfortable now than I've ever been as manager of West Ham.
"There might be one more permanent signing to come in."
Sheff Utd: Kenny, Bromby, Morgan, Jagielka, Wright, Quinn,
Thirlwell, Tonge (Lester 45), Harley, Ward, Gray.
Subs Not Used: Montgomery, Forte, McCall, Sharp.
Booked: Ward, Harley.
Goals: Quinn 65.
West Ham: Bywater, Repka, Davenport, Fletcher, Brevett,
Chadwick (Nowland 63), Reo-Coker, Mullins (Mackay 87),
Etherington, Sheringham, Harewood (Rebrov 75).
Subs Not Used: Walker, Powell.
Booked: Reo-Coker, Fletcher.
Goals: Harewood 9, Sheringham 85.
Ref: A Wiley (Staffordshire).