Marcus Rashford and Marouane Fellaini fired Manchester United to Wembley as West Ham's last-ever FA Cup tie at Upton Park ended in a 2-1 defeat.
The Hammers went into the quarterfinal replay as favourites to see off a United side enduring another tough season amid rumours of dressing room disharmony and mounting criticism of boss Louis van Gaal.
But second-half goals from youngster Rashford, his sixth since bursting onto the scene in February, and the much-maligned Fellaini booked a semifinal clash with Everton a week on Saturday.
James Tomkins set up a grandstand finish with a brave header with 11 minutes remaining, and Cheikhou Kouyate had a last-gasp equaliser ruled out for offside.
But United held on to keep Van Gaal in with a chance of finishing a turbulent campaign with some silverware -- their first for three years.
The Hammers move to the Olympic Stadium next season but are determined to say goodbye to the Boleyn Ground with a bang.
They swarmed all over the visitors in the opening stages with Michail Antonio and Enner Valencia forcing saves from David De Gea.
But United soaked up the early pressure and actually created the best chance of the first half, Jesse Lingard finding Fellaini in the area only for Darren Randolph to tip his shot over.
Valencia should have done better after getting in behind Chris Smalling but once again his shot was too close to De Gea, while Randolph made another smart stop to deny Lingard.
Nine minutes into the second half United made the breakthrough after Antonio gave the ball away inside his own half and Anthony Martial slipped in Rashford just inside the penalty area.
The youngster still had plenty to do, but he stepped inside James Tomkins before curling a superb shot beyond Randolph and into the top corner for a 54th-minute opener.
West Ham felt they should have been awarded a penalty moments later when Daley Blind blocked Dimitri Payet's run in the area but referee Roger East was unconvinced.
Instead they fell two behind when Lingard's cross was blasted back across goal by Martial and diverted into the net by the knee of Fellaini.
West Ham should have been down and out but they at least made a game of it when Andy Carroll nodded Payet's corner into the six-yard box and Tomkins bravely stooped to head past De Gea with 11 minutes left.
In a frantic finale Carroll headed narrowly over and De Gea made a superb save to deny Kouyate, before the midfielder's header was ruled out by a narrow offside decision.