Kenny Miller opened the scoring when he pounced on a mix-up that ensued in the penalty box, before Bobby Zamora netted from close range for the equaliser.
Miller grabbed his second when he converted Ki-Hyeon Seol's pass, before Zamora tapped in for his brace.
Paul Ince made it 3-2 for the hosts after more confusion in the box and then Carl Cort sealed the win when he arrived to convert Seol's cross.
West Ham manager Alan Pardew:
"We're disappointed with the goals which we conceded. We gifted Wolves goals and shot ourselves in the foot at critical moments in the match.
"But I can't fault the work-rate or the application of the players - and I think the fans will back me on that.
"Every game is critical for West Ham but we're going through a difficult time here at the moment and arrived for the game with only half a team."
Wolverhampton: Murray, Naylor, Lescott, Craddock, Clyde, Kennedy, Olofinjana (Cameron 67), Ince, Seol, Miller, Cort.
Subs Not Used: Oakes, Newton, Cooper, Clarke.
Booked: Olofinjana, Ince.
Goals: Miller 29, 54, Ince 72, Cort 75.
West Ham: Walker, Powell, Ferdinand, Mackay, Repka, Chadwick (Cohen 87), Noble (Williams 79), Mullins, Rebrov, Zamora, Harewood.
Subs Not Used: Bywater, Melville, Brevett.
Goals: Zamora 36, 57.
Ref: C Penton (Sussex).