Paddy McNair was the surprise hero for Sunderland after scoring a second-half double to help the club progress into the fourth round of the EFL Cup.
QPR took the lead at Loftus Road through Sandro's fine strike on the hour-mark.
But Sunderland - boosted by a triple sub by boss David Moyes - hit back immediately through McNair's first senior goal in the 70th minute.
He added a second ten minutes later to seal Sunderland's safe passage into the fourth round of the EFL Cup, the first time they have managed that since their run to the final in 2014.
Both managers made widespread changes.
David Moyes making six changes from the side beaten 1-0 by Spurs and Jimmy Floyd Hasselbaink eight from their 2-1 defeat to Huddesfield Town.
John O'Shea, Paddy McNair, Duncan Watmore, Patrick van Aanholt, Lynden Gooch and Joel Asoro all handed starts, with Sunderland lining up in a 4-4-2 formation.
The big news was the return of Dutch left-back van Aanholt to the starting line-up.
Van Aanholt was withdrawn at the last minute on Sunday at White Hart Lane after the team sheets had been submitted and warm-ups following advice from cardiologists.
But he was in from the start at Loftus Road.
And it was a competitive start to proceedings, with 17-year-old Asoro the first player with a sight on goal.
He pulled his shot wide in the second minute after being played in by Watmore.
Sunderland had started well and should have taken the lead 11 minutes in.
Watmore played in by Didier Ndong but the England Under-21 ace saw his well-hit strike tipped wide by Matt Ingram, a superb stop.
QPR's first sight on goal came in the 21st minute, Abdenasser El Khayati manouevered room for himself in the Sunderland area before unleashing his shot, Pickford standing tall to make
The ball looped up but Manchester City loanee Denayer was quick to react and head it over his own crossbar.
Almost immediately up the other end, American winger Gooch then dragged his attempt wide from inside the area.
Jan Krichhoff produced a brilliant cushioned volley 27 minutes in, Ingram equal to it though, the QPR stopper getting down low to palm it wide.
There were few further chances of any real note, with both sides battling hard but struggling to create that extra bit of magic to find a breakthrough.
Half-time: QPR 0 Sunderland 0
Sunderland came storming out of the traps for the second half, with Paddy McNair seeing a shot cleared off the line by Lynch before Kirchhoff's header was deflected wide.
The game had finally sprung into life, with Conor Washington - who had been anonymous in the opening 45 minutes - heading just wide of Pickford's post 53 minutes in.
The breakthrough finally came in the 60th minute. Djilobodji misjudged a headed clearance, the ball going out for a corner.
And from that corner, the ball eventually fell to Sandro on the edge of the area and he hit a shot on the turn into the bottom right-hand corner of Pickford's net.
It was a fine finish as Sunderland looked to hit back straight away, Watmore crowded out of one attempt before van Aanholt shot just wide.
And it wasn't long before Sunderland were level. A minute after Moyes had made a triple sub, McNair equalised.
Watmore played him in, the former Manchester United defender latching onto the ball inside the area before cooly slotting home past Ingram.
And to the amazement of McNair himself and the travelling Sunderland supporters - he doubled their lead 10 minutes later.
Ndong's fierce effort was palmed out by Ingram straight into the path of the onrushing McNair who fired home.
Cue wild celebrations in front of the travelling support.
McNair the hero as Sunderland progressed to the fourth round.
Full-time: QPR 1 Sunderland 2
QPR (4-2-3-1): Ingram, Hamalainen, Caulker (C), Kakay, Lynch, Cousins, Wszolek, El Khayati, Sandro, Sylla (Polter, 74), Washington, (Luongo, 80).
Subs Not Used: Smithies, Onuoha, Borysiuk, Chery, Paul.
Goals: Sandro (60)
Sunderland AFC (4-4-2): Pickford, Denayer (Love, 69), van Aanholt, Djilobodji, O'Shea (C), McNair, Kirchhoff, Ndong, Watmore, Gooch (Cattermole, 69), Asoro (Maja, 69).
Subs Not Used: Kone, Jones, Greenwood, Mika.
Goals: McNair (70, 80)
Referee: Peter Bankes (Merseyside)