Shola Ameobi scored his third goal of the season as Newcastle handed Harry Redknapp his first defeat as Queens Park Rangers manager.
It looked like being a frustrating day for the Magpies, who had lost six of their previous seven games, as Demba Ba and Papiss Cisse missed good chances.
But substitute Ameobi rifled in a shot with nine minutes remaining for his first league goal in nine months.
Ameobi finish was class - Pardew
QPR battled hard, with striker Djibril Cisse missing their best chance.
Rangers, who defended stoutly and looked dangerous on the counter-attack, thought they had done enough as they looked to continue their mini-revival under new manager Redknapp.
However, it was Redknapp's opposite number Alan Pardew who changed the course of the match, with two of his substitutes having a direct influence in the match-winning strike.
Sylvain Marveaux replaced Cheick Tiote with 13 minutes left, and his extra quality created the opportunity for Ameobi to collect the Frenchman's pass, cut inside and find the back of the net with a classy finish.
It justified Pardew's decision to replace Papiss Cisse with Ameobi - a substitution which caused some discontent from the stands, and plenty of frustration from the Senegalese striker. Papiss Cisse refused to shake his manager's hand as he angrily made his way to the dugout to watch the remainder of the match.
Goals, goals, goals
There has not been a Premier League goalless draw at St James' Park during the whole of 2012. The last was against Swansea in December 2011.
It capped a miserable day for the number nine, as he and his strike partner Ba struggled to break down a resolute Rangers defence expertly marshalled by Ryan Nelsen.
The one time the two did link up to good effect midway through an uninspiring first half ended with Cisse being denied by Fabio's well-timed tackle.
Ba also fired two free-kicks into the stands as Newcastle looked short on ideas without influential midfielders Yohan Cabaye and Hatem Ben Arfa.
QPR almost stunned St James' Park after the break when Adel Taarabt, who scored two goals in his side's victory over Fulham last weekend, showcased some outrageous skill to leave three defenders in his wake and slotted a pass through for Djibril Cisse. The French striker held off his marker, but his shot found the side-netting.
Newcastle were struggling for inspiration, until Pardew brought on Ameobi and Gabriel Obertan with just half an hour to go.
Redknapp hints at January deals
The change worked a treat, as the home side became much more of a threat in the final third - Ba turning and having a shot deflected over and then having a weak header saved by Rob Green.
A goal seemed inevitable, and it was no surprise when Ameobi slotted home. There was still time for the impressive Marveaux to go close with two shots that were well saved by Green, but Newcastle had done enough.
The only negative to come out of the game for the hosts was a fifth booking of the season for Tiote, which rules the midfielder out of his side's Boxing Day trip to Manchester United.
Rangers will take plenty of heart from their workmanlike performance, with defeats for their relegation rivals Reading, Wigan and Southampton meaning very little has changed in the bottom four.
Newcastle boss Alan Pardew:
"I know the crowd weren't particularly pleased when I took Cisse, a goalscorer, off but I just felt Shola, he's a big man and this was a big occasion and he likes big occasions.
"It said QPR on the programme but really it was bigger than that, I think we all knew that and he has that calm head - he knows what is demanded here - to produce a quality goal, and it won us the game.
"I wanted to get Shola on the pitch, and thank goodness I did because it was a really class finish."
QPR boss Harry Redknapp:
"I thought we were going to hang on and nick a draw. I couldn't see us winning, but we just couldn't see it through.
"I thought we could hang on for a good point to keep us going, but it just wasn't to be."
Jamie Mackie fouled by Mike Williamson, the ref awards a free kick. Shot on goal comes in from Adel Taarabt from the free kick, save by Tim Krul.
Rob Green takes the direct free kick.
90:00 +4:22 Booking
Booking Booking for Shola Ameobi.
Foul by Ryan Nelsen on Demba Ba, free kick awarded. Demba Ba takes the direct free kick.
The referee blows for offside. Tim Krul restarts play with the free kick.
Shola Ameobi is caught offside. Free kick taken by Rob Green.
Shola Ameobi takes a shot. Save by Rob Green.
Free kick awarded for an unfair challenge on Demba Ba by Ryan Nelsen. Demba Ba takes the free kick.
Clint Hill concedes a free kick for a foul on Demba Ba. Direct free kick taken by Vurnon Anita.
David Hoilett fouled by Davide Santon, the ref awards a free kick. Free kick taken by Rob Green.
Assist on the goal came from Sylvain Marveaux.
Adel Taarabt is flagged offside by the assistant referee. Indirect free kick taken by Tim Krul.
Shaun Derry takes the direct free kick.
Booking James Perch is shown a yellow card for unsporting behaviour.
Foul by James Perch on Adel Taarabt, free kick awarded.
Clint Hill challenges Demba Ba unfairly and gives away a free kick. Strike on goal comes in from Sylvain Marveaux from the free kick.
Direct free kick taken by Vurnon Anita.
Booking Clint Hill receives a caution.
Free kick awarded for an unfair challenge on Demba Ba by Clint Hill.
Sylvain Marveaux takes a shot. Save made by Rob Green.
Corner taken by Adel Taarabt.
Assist by Vurnon Anita.
80:11 Goal scored
Goal - Shola Ameobi - Newcastle 1 - 0 QPR Goal scored by Shola Ameobi from deep inside the penalty area to the bottom left corner of the goal. Newcastle 1-0 QPR.
Danny Simpson takes a shot. Clint Hill manages to make a clearance. Outswinging corner taken from the right by-line by Vurnon Anita.
Substitution Shaun Derry joins the action as a substitute, replacing Alejandro Faurlin.
Substitution Sylvain Marveaux is brought on as a substitute for Cheick Tiote.
Stephane Mbia concedes a free kick for a foul on Shola Ameobi. Free kick taken by Tim Krul.
Demba Ba takes a shot. Save by Rob Green.
Clint Hill gives away a free kick for an unfair challenge on Shola Ameobi. Demba Ba has an effort direct from the free kick, Adel Taarabt gets a block in. Outswinging corner taken from the right by-line by Vurnon Anita.
Shola Ameobi fouled by Clint Hill, the ref awards a free kick. Tim Krul takes the direct free kick.
Header by Shola Ameobi from deep inside the penalty area misses to the left of the goal.
Demba Ba takes a shot. Ryan Nelsen gets a block in. Corner taken by Vurnon Anita played to the near post, save by Rob Green.
Vurnon Anita takes a inswinging corner from the left by-line to the near post, Rob Green manages to make a clearance.
Direct free kick taken by Anton Ferdinand.
Substitution David Hoilett replaces Djibril Cisse.
Booking Cheick Tiote goes into the book for unsporting behaviour.
Cheick Tiote challenges Shaun Wright-Phillips unfairly and gives away a free kick.
Ryan Nelsen gives away a free kick for an unfair challenge on Shola Ameobi. The free kick is delivered right-footed by Vurnon Anita from left wing, save by Rob Green.
Free kick awarded for an unfair challenge on Fabricio Coloccini by Jamie Mackie. Direct free kick taken by Tim Krul.
Substitution Shola Ameobi is brought on as a substitute for Papiss Cisse.
Substitution Gabriel Obertan on for Jonas Gutierrez.
Header from deep inside the area by Papiss Cisse goes over the bar.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.