Leicester had taken the lead in the 34th minute through Jermaine Beckford, but Winston Reid levelled five minutes later for West Ham with his third league goal, then Jack Collison hit the winner just before the hour.
Southampton are still in pole position for the second promotion spot on 85 points from 45 games, whilst the Hammers are on 83 points and with an inferior goal difference.
West Ham host Hull City on Saturday as the Championship draws to a conclusion, while Southampton entertain already-relegated Coventry City.
Leicester manager Nigel Pearson made just the one change for Monday evening's Championship clash.
City’s goalless draw with Burnley last Tuesday meant that Pearson's side are unable to make the play-offs, but he resisted the temptation to make wholesale changes, with Andy King for Lloyd Dyer the only change.
West Ham made three changes from the side that drew 1-1 with Bristol City. The Hammers brought Carlton Cole back to lead the attack after he missed the game on Tuesday with a knee injury.
Gary O'Neil also overcame a groin problem to start, while Collison was the third change.
Both sides were 5/1 favourites for the title at the start of the season after splashing the cash in pre-season. Leicester spent £14 million, and West Ham £10m but the respective boards would have been looking at their terms and conditions for any money-back guarantees in a disjointed first half hour markedly lacking in quality.
Collison had an early chance blocked, then Leicester goalkeeper Kasper Schmeichel saved from the same player after a Souleymane Bamba error had set up Cole.
Cole was then denied by a magnificent tackle by Wes Morgan in the penalty area as he closed in on goal in the 17th minute.
Leicester suffered a big setback midway through the half when Ritchie Wellens limped off after catching his studs in the grass. Yet his replacement, Dyer, ended up being a constant threat for the home side with his rampaging runs down the left.
Leicester took the lead in the 34th minute when Ben Marshall rolled Matt Taylor and dinked up a beautiful ball for Beckford to get in between James Tomkins and Guy Demel to head past Robert Green in the West Ham goal.
Yet, five minutes later the visitors were back on level terms through the unlikely figure of Reid. Mark Noble reverse passed the ball down the left flank and Taylor’s cross was met by Reid running behind Lee Peltier at the near post to poke home.
In the second minute of the second half, Noble then saw a shot from the right-hand edge of the box float just wide of Schmeichel’s goal, after Marshall had conceded possession rather too easily.
West Ham had a golden chance in the 57th minute, when O'Neil sets up Nolan down the centre after Cole dragged out Morgan with a clever run, but the Hammers captain sidefooted wide.
But Collison showed his captain how to finish a minute later, with a low shot past Schmeichel, after Noble's shot had initially been blocked by substitute Sean St Ledger.
Nolan then had a great chance in the final minute to make it three after rolling St Ledger on the edge of the area, but Schmeichel did well to stand up to save.