Luton won the right to host Premiership Blackburn in the fourth round of the FA Cup after QPR self-destructed at Kenilworth Road.
Nygaard (right) wasted several chances for QPR
The visitors had slightly the better of a forgettable first half, although neither side had many clear chances.
The drama came in the last 15 minutes, as Stefan Bailey saw red for a lunge on Ahmet Brkovic before Zesh Rehman put Dean Morgan's shot into his own net.
Morgan could have wrapped it up in injury time but blasted over the bar.
606 DEBATE: Your thoughts on the game
A poor pitch and wintry conditions did little to assist flowing football by either side in the first half, although the visitors just about edged it on points.
Dexter Blackstock looked dangerous early on, crossing from the left to set up a great chance for Marc Nygaard, who failed to connect at the far post.
Blackstock was involved again as he and Jimmy Smith combined to draw an excellent double save from Dean Brill as the visitors continued to have most of the few chances on offer.
QPR keeper Simon Royce had a quiet first half and when his goal suffered its most serious threat, it was self-inflicted.
Richard Langley's long pass forward into the box caused a moment of confusion between Royce and Rehman but Lewis Emmanuel's foul on Smith got the defender off the hook.
Mercifully the standard of play improved after the break but moments of genuine skill or goal threat were still conspicuous by their absence.
The match was won and lost in six minutes late on as QPR suffered a double blow.
Bailey's two-footed lunge on Brkovic saw the visitors reduced to 10 men, and as they struggled to adjust, Rehman put through his own net, diverting Morgan's off-target shot into his own net.
QPR sent on Gareth Ainsworth late on as the full cost of Nygaard's wasted chances earlier on became clear, but their desperate scrambling was all in vain.
Morgan could have finished the game in style for Luton, dribbling into the penalty area from wide on the left, only to balloon the ball over Royce's bar from eight yards.
Luton manager Mike Newell:
"We were through at Loftus Road until a handball went against us so maybe this was our night.
"You don't always get what you deserve in the cup but maybe we were meant to get Blackburn.
"I just hope we've got enough players left because the way they've played away lately it could be embarrassing."
QPR manager John Gregory:
"I'm devastated we're out. We should have been 4-0 up at half-time and won 7-0.
"We missed chance after chance and we choked. It was almost like a script out of 'Dream Team'. You couldn't make it up and now we're out of the Cup.
"It's a big blow to the club because it's a lot of money we've lost."
Luton: Brill, Foley, Davis, Coyne, Perrett, Bell, Robinson, Langley, Emanuel, Boyd, Brkovic (Morgan 76).
Subs Not Used: Barrett, O'Leary, Keane, Stevens.
Booked: Coyne, Morgan.
Goals: Rehman 80 og.
QPR: Royce, Rehman, Mancienne, Stewart, Milanese, Smith (Ainsworth 84), Bailey, Lomas, Cook, Blackstock, Nygaard (Ray Jones 72).
Subs Not Used: Cole, Kanyuka, Furlong.
Sent Off: Bailey (74).
Ref: M Jones (Mansfield).