Marlon Harewood scored twice as West Ham climbed into the top three.
Harewood (centre) celebrates scoring
Harewood headed home Michael Carrick's corner before collecting Kevin Horlock's pass and firing past keeper Clayton Ince from 20 yards.
Nigel Reo-Coker also hit the net from long-range, and Jobi McAnuff's effort from the edge of the area put the Hammers 4-0 up at half-time.
Steve Jones pulled one back with a tidy finish and then rounded keeper Stephen Bywater for his second.
But by then the East Londoners had done enough to secure victory and Crewe ended the game with youngster Stuart Tomlinson in goal after Ince was injured late on.
West Ham made the perfect start, going ahead after just six minutes.
Ince tipped away Bobby Zamora's left-footed shot and from the resulting corner, Harewood pounced to score his ninth goal since his November move to Upton Park.
His 10th should have arrived shortly afterwards, but he sliced his shot wide after the ball was pulled back from the right-hand touchline by McAnuff.
But Harewood made no mistake when Horlock picked him out in the 20th minute and once Ince had been beaten for the second time, Alex faced an uphill battle.
Crewe briefly threatened when Dean Ashton tried his luck from 25 yards and Stephen Foster headed David Vaughan's corner over the bar.
Their opponents were totally dominant though and Jon Harley crossed from the left to Harewood, who teed up Reo-Coker to smash home the third goal.
Worse followed for Crewe four minutes before the interval.
McAnuff, who caused Dario Gradi's defence problems throughout, was allowed to cut in from the right and score his first goal for West Ham with his less-favoured left foot.
Crewe were given some respite as Alan Pardew's men eased off in the second half.
Jones reduced the deficit by gathering Craig Hignett's pass and sending a right-footed effort beyond Bywater.
Zamora then embarrassingly missed a simple chance to restore his team's four-goal cushion.
Harewood stormed down the right and found his strike partner, who missed the target from five yards out with the goal at his mercy.
Jones gave Crewe a glimmer of hope when he beat Bywater and managed to score from an acute angle.
But the forward's second goal of the game was followed by what looked a serious injury to Ince, who seemed to twist his knee while clearing the ball.
The Trinidadian was carried off on a stretcher - an ominous sign for a Crewe side still not safe from relegation.
West Ham: Bywater, Repka, Dailly, Melville, Harley, McAnuff,
Reo-Coker, Carrick, Horlock, Harewood, Zamora.
Nowland, Carole, Deane, Cohen.
Crewe: Ince, Walker, Foster, Vaughan, Cochrane, Lunt,
Billy Jones, Hignett, Sorvel, Steve Jones, Ashton.
Tomlinson, Tonkin, Robinson, McCready, Edwards.
Referee: D Crick (Surrey)