Newcastle maintained their hopes of finishing in a Champions League spot while ending Chelsea's championship hopes with a sensational comeback.
Chelsea started fast and scored first when Frank Lampard fed Joe Cole.
But the match turned on Shola Ameobi's equaliser when he held off Marcel Desailly to volley in before the break.
After the restart it was all Newcastle and Alan Shearer scored the winner with a spectacular swerving long-range volley that capped a wonderful match.
And as well as the goals, Shay Given and Marco Ambrosio made some sharp stops before John Terry hit the post in stoppage time.
The only black spot for Newcastle, and England, came when Jonathan Woodgate limped off with a leg injury in the second half.
Newcastle manager Sir Bobby Robson sent out the same team that drew with Marseille in midweek, while Claudio Ranieri could not resist a tweak or two of the side he started with in the semi-final fiasco in Monaco.
5 mins: Cole silences St James' after slick one-two
41 mins: Ameobi levels with fierce volley
47 mins: Shearer strikes with sensational swerving shot
Geremi and Joe Cole came in through the revolving door of squad rotation and under bright skies it was Cole who emerged from the shadows to light up Chelsea's play with an early goal from the Upton Park Academy.
Having received the ball from Cole, Frank Lampard released a perfectly weighted pass that allowed his former West Ham team-mate to skip beyond the defence and slip the ball between Given's legs for his first goal in Chelsea colours.
Newcastle started slowly after having 48 hours less to recover from their European exertions and Chelsea could, and arguably should, have been further ahead before the hosts hit their stride.
Cole could not find Hernan Crespo in the box and moments later the Argentine failed to control a lofted through ball from Lampard.
And Cole went close to a second when he checked inside Andy O'Brien only to push his effort wide of Given's left post, the exact same spot Eidur Gudjohnsen saw a shot pass by a minute later.
A goal finally came, but at the other end.
Ambrosio had been forced into fine saves from speculative long range efforts from Laurent Robert and Darren Ambrose, who has clearly been picking up some tips from the Frenchman at training.
Evidence suggests Ameobi and Shearer have also been watching Robert's rockets closely if their strikes either side of half-time are any evidence.
Ameobi did well to hold up a clipped Hugo Viana throughball and hold off the attentions of Marcel Desailly before pirouetting and scoring with a fierce effort from the edge of the area.
After the break Shearer then scored a sensational goal having again made a mockery of Desailly's marking efforts.
Collecting the ball wide on the left he turned and struck a right-footed effort that bent away from Ambrosio and into the net.
But Shearer went from the sublime to the ridiculous side-footing wide from a few yards. It was not the only wasted effort.
Shearer fluffing a good opportunity at the near post before Jimmy-Floyd Hasselbaink and Lampard missed the target when they should have at least forced Given into a save.
But the Republic of Ireland stopper was equal to the task when called upon, clawing away a Gudjohnsen header from six yards that proved just as vital as the sensational strikes at the other end.
Newcastle: Given, Hughes, O'Brien, Woodgate (Bramble 78),
Bernard, Ambrose, Speed, Viana, Robert, Ameobi (Bridges 85),
Subs Not Used: Harper, Chopra, Brittain.
Chelsea: Ambrosio, Melchiot, Desailly (Huth 71), Terry, Bridge,
Geremi, Makelele, Lampard, Cole, Gudjohnsen,
Crespo (Hasselbaink 71).
Subs Not Used: Sullivan, Nicolas, Oliveira.
Booked: Huth, Hasselbaink.
Referee: R Styles (Hampshire).