Pompey reached the third round of the Carabao Cup for the first time since 2010 after scoring two second half goals at the Kiyan Prince Foundation Stadium.
There was not much to separate the sides for much of a low-key contest, but the Blues finally showed a clinical touch towards the end.
John Marquis broke the deadlock from the penalty spot and Marcus Harness then wrapped things up following good work from Ross McCrorie.
Kenny Jackett made two changes from the side that dramatically drew with Coventry eight days earlier.
Brandon Haunstrup came in for the injured Lee Brown, while Sean Raggett dropped to the bench to make way for Christian Burgess.
The latter started in an unfamiliar right-back role, as Tom Naylor stepped back into defence and McCrorie moved to midfield.
It was a largely forgettable affair in the first period, with neither keeper being particularly over-worked.
The Championship hosts were marginally on top in the early stages and their best chance to break the deadlock arrived on 11 minutes.
Jan Mlakar raced past Naylor and slipped a cross-shot towards the far post, where a sprawling Bright Osayi-Samuel could not quite make a connection.
A long-range attempt from the lively Ilias Chair was then comfortably dealt with by Craig MacGillivray.
Pompey had a couple of decent opportunities of their own midway through the half, as they began to move through the gears.
A 30-yard effort from McCrorie bounced awkwardly in front of Rangers keeper Liam Kelly and he did well to push the ball clear.
Ronan Curtis then took a poor first touch from Marquis’ pass, but spun quickly and curled a shot narrowly past the post.
Another Chair effort failed to properly trouble MacGillivray, while his team-mate Ryan Manning was booked for a late challenge on McCrorie.
It was the Blues who looked brighter just before the break, although Harness’ delivery was just too high for skipper Gareth Evans in the box.
Half Time: QPR 0 Pompey 0
The action did not immediately heat up once the action restarted, with the contest continuing to drift along.
But Rangers carved open a decent chance just before the hour mark after Harness and Burgess had combined to negate Osayi-Samuel’s tricky footwork.
The ball was immediately sent back into the area by Manning, however, and Marc Pugh could only direct his header straight at MacGillivray.
That came during a bright spell for the hosts, who started to cause Pompey a few problems at the back.
Jackett freshened things up by making a substitution, as Evans made way for Andy Cannon, with Naylor taking the armband.
Burgess soon had a chance to be the unlikely goalscoring hero, hitting a fierce first-time shot from the edge of the box that fizzed over the crossbar.
And the visitors did take the lead on 77 minutes after Toni Leistner tugged Marquis to the turf inside the box.
Referee Ross Joyce immediately pointed to the spot and MARQUIS sent Kelly the wrong way, coolly slotting the ball into the bottom corner.
But it got even better for the Blues just four minutes later, as they doubled their advantage following a quick break.
Marquis laid the ball off for McCrorie, who suddenly shot forward, leaving Leistner trailing in his wake.
The Scotland under-21 international then slid a pass across the face of goal, teeing-up HARNESS for a simple finish.
Rangers should have reduced their deficit soon after, only for Mlakar to hit a tame effort straight at MacGillivray from just a few yards out.
Pompey then went close themselves in a breathless finale, with Kelly doing well to keep out a fierce close-range strike from Marquis.
The hosts thought they had given themselves a chance of taking the tie to penalties when Ebere Eze found the net in stoppage-time.
They raced back to the centre circle, but after conversing with his assistant, Joyce ruled the goal out for offside.
QPR (4-4-1-1): Kelly; Kane, Leistner (c), Barbet, Manning; Pugh (Ball 75), Owens, Smith, Osayi-Samuel (Eze 60); Chair (Wells 60); Mlakar
Booked: Manning, Wells, Kelly, Kane
Subs not used: Barnes, Masterson, Scowen, Hugill
Pompey (4-2-3-1): MacGillivray; Burgess, Downing, Naylor, Haunstrup; Close (Walkes 90+4), McCrorie; Harness, Evans (c) (Cannon 60), Curtis; Marquis
Goals: Marquis 77 (pen), Harness 81
Subs not used: Bass, Raggett, Maloney, Pitman, Harrison
Referee: Ross Joyce
Attendance: 7,783 (1,874 Pompey fans)