Craig Gardner scored for the second match in succession as Aston Villa ran out deserving winners at Villa Park.
Craig Gardner is mobbed after scoring for Villa
The midfielder fired home a deflected free-kick in the 23rd minute after Danny Gabbidon tripped Gabriel Agbonlahor on the edge of the area.
With Ashley Young prominent on the wing, Villa created great chances that Luke Moore and Agbonlahor squandered.
West Ham threatened only sporadically, though they did have an Henri Camara effort disallowed for handball.
Having shown their Jekyll and Hyde nature in building and then throwing away a three-goal lead at White Hart Lane on Monday, Villa sought to demonstrate their positive traits by going straight on the attack.
Ashley Young skinned Gabbidon down the left wing and crossed but Moore completely missed his kick from eight yards.
Against the run of play, West Ham had the ball in the net in the ninth minute, though the effort was quickly ruled out.
Matthew Etherington crossed, but Camara's use of the hand in converting was blatant and he could have few complaints about getting booked.
Young, showing flashes of inspiration, was prominent as Villa continued to create and waste chances. The winger had shouts for a penalty before sending in a cross that Agbonlahor could only head straight at Robert Green.
But their pressure paid off on 23 minutes. Gabbidon tripped Agbonlahor 20 yards out and paid the ultimate price as it was his deflection that sent Gardner's free kick past Green.
Camara, who made more of an impact with his hand than his boot, was replaced by Carlton Cole in the first half, but the impetus remained with Villa.
Lucas Neill, bearing the brunt of the chants as news of England's win against Australia in the Rugby World Cup filtered through, continued to toil against the pace of Young.
And Young was the provider again with a cross that narrowly evaded both Moore and Agbonlahor.
West Ham's chances were sporadic, but Cole should have done better when the ball fell to him 10 yards out after a weak clearance in the 56th minute.
Villa had shouts for a penalty turned down on 75 minutes as Young tormented the defence once more. His cross after cutting in from the left appeared to brush Neill's arm, but referee Steve Tanner was unmoved.
Temporarily awoken from their slumber, West Ham briefly threatened as Cole volleyed narrowly over from 15 yards.
But the chance failed to spark any concerted pressure and even the introduction of Mark Noble and Luis Boa Morte failed to lift the disjointed Hammers.
Aston Villa boss Martin O'Neill:
"I am very, very pleased with the team.
"We played some great football in the first half, then we saw it through and deserved to win.
"Ashley Young was in splendid form and, at times, was unplayable. The young players all did brilliantly, as did Martin Laursen in defence. He was like a Trojan for us.
"It looked like Gabriel Agbonlahor should have had a penalty, but we won so I can be magnanimous."
West Ham manager Alan Curbishley:
"We are desperately disappointed not to pick up anything. As the game wore on we got better.
"The free-kick (which led to the goal) was completely wrong. That's two bad decisions in the past two weeks.
"There was no contact and the referee has got it wrong. Everything that can go wrong is going wrong at the moment."
Aston Villa: Carson, Mellberg, Laursen, Knight, Bouma, Gardner (Petrov 78), Reo-Coker, Barry, Agbonlahor, Moore (Maloney 66), Young.
Subs Not Used: Taylor, Davies, Osbourne.
Booked: Knight, Reo-Coker, Mellberg.
Goals: Gardner 24.
West Ham: Green, Neill, Gabbidon, Upson, McCartney, Ljungberg, Bowyer, Mullins (Noble 80), Etherington (Boa Morte 81), Ashton, Camara (Cole 36).
Subs Not Used: Wright, Collins.
Booked: Camara, McCartney.
Ref: Steve Tanner (Somerset).