Harry Redknapp’s side secured their first back-to-back wins since they returned to the top-flight in 2011.
Sunderland had gone ahead midway through the first half when Steven Fletcher side-footed home from close range, but that lead lasted just 10 minutes with Loic Remy firing home.
The win came courtesy of two more of Redknapp’s January signings. They went ahead with 20 minutes left as Andros Townsend, on-loan from Tottenham, brilliantly fired home a left-footed half-volley from 25 yards into the corner of the net.
The three points were sealed as substitute Jermaine Jenas, another arrival from Spurs, smashed home from edge of the box.
The win means QPR remain bottom, but they are now level on points with Reading and still four points from safety, while Sunderland are just a further three points better off.
Rangers had been the better side throughout the opening 45 minutes with Junior Hoilett in fine fettle. The opening chance came for him just four minutes in when he skipped into the box before lashing his shot just wide.
The former Blackburn star then struck another effort across goal as Sunderland struggled to contain him. He almost turned provider just moments later too, but his ball into the six-yard box was tantalisingly just too strong for Bobby Zamora to make a connection with.
Suddenly, and very much against the run of play, Sunderland were ahead and it was a brilliant counter attack.
Fletcher started the move with a back-heel to find Stephane Sessegnon – he drove into the box and crossed to the unmarked Adam Johnson, who fired the ball into the six-yard box where Fletcher had arrived to side-foot home from close range.
Danny Graham headed over from just eight yards out not long after as QPR stirred themselves and were level on the half-hour as Townsend’s shot deflected off John O’Shea and into the path of Remy, who made no mistake in beating Simon Mignolet.
QPR could and should have been ahead before the break but Remy volleyed over, whilst Mignolet was forced to save from Zamora and Stephane M’Bia.
Sunderland had the opening chance of the second half as Johnson fizzed a shot just over the crossbar. The ineffective Graham was replaced by Danny Rose which saw the away side alter their system and they looked better for it.
However, it was QPR who claimed the crucial third goal of the contest and it was a special strike. Fletcher’s clearance came to Townsend 25 yards from goal, he took it on his chest, allowed it to bounce before striking an exquisite left-footed strike beyond the helpless Mignolet.
The Belgian was again powerless in the final minute when another Sunderland clearance fell for Rangers, this time Jenas – who smashed it into the bottom corner to seal the win.