Sebastian Drozd’s second-half goal was the difference as Philippe Clement’s side were knocked out of the competition.
There were five changes from last weekend’s Scottish Premiership victory over Ross County, with Rafael Fernandes and Bailey Rice both making their first starts for the club.
Rangers lined-up with Liam Kelly in goal behind a back four of James Tavernier, Rafael Fernandes, Robin Propper and Jefte.
Rice came into midfield alongside Mohamed Diomande, and Nedim Bajrami, while Ianis Hagi and Vaclav Cerny provided the support for Hamza Igamane.
There was an early chance for Rangers as Mohamed Diomande latched onto a clearance from Calum Ferrie, but it was just wide from the midfielder before Ianis Hagi tried a strike from distance but flashed it just wide of the right-hand post.
Ferrie pulled off a fantastic save with 12 minutes played as Rangers launched another attack. Ianis Hagi did well down the left to see off the Queen’s Park defender and deliver a ball into the path of Mohamed Diomande but the goalkeeper got a strong hand to keep it out.
Cerny was next to be denied by the visiting number one as Clement’s men continued to push for an opening goal.
As expected, Rangers were dominating possession at Ibrox but were struggling to find a breakthrough against the Championship side. Diomande saw another effort tipped over the bar by Ferrie, before the corner was worked towards the midfielder but it was wide.
Another corner opened up an opportunity for Rangers with Ianis Hagi striking a powerful left-footed shot towards goal but it was cleared off of the line by Jack Turner.
There were two changes at half-time as Clement introduced Cyriel Dessers and Nico Raskin for Nedim Bajrami and Bailey Rice.
It was more of the same in the second-half for Rangers, as they controlled the game at Ibrox but were unable to carve many clear openings in the early stages after the break.
Dessers threatened as he latched on the end of a through ball, but his shot was deflected out for a corner.
From the set-piece, Cerny sent a good delivery into the box with Hamza Igamane getting a strong connection to turn it towards goal, but it was pushed over the bar by Ferrie.
There was a VAR check with 25 minutes of the game remaining as Ridvan’s ball into the box appeared to hit the hand of a Queen’s Park player inside the area, but it was not given as play continued.
It was the Championship side who took the lead at Ibrox in the 70th minute. A corner was swung into the box by Louis Longridge and fell for Sebastian Drozd. The Queen’s Park man took a touch beyond Jefte before finding a finish low beyond Kelly.
Ridvan fired over the bar, before Hamza Igamane saw a shot saved by Ferrie as Rangers looked to rescue this cup tie.
With five minutes added on, the Light Blues were still pushing for a route back into the game as Cyriel Dessers was through on goal and took a touch before getting a shot away, but Ferrie tipped it wide for Queen’s Park.
Cerny flashed a low shot wide, before Ferrie denied the winger with a good save shortly after.
With just seconds of the 90 minutes remaining, Rangers were awarded a penalty after Hamza Igamane was fouled in the box. Captain James Tavernier stepped-up to the spot, and it was saved by Calum Ferrie.
RANGERS: Kelly, Tavernier, Fernandes (Souttar, 60), Propper, Jefte, Diomande (Lawrence, 86), Rice (Raskin, 46), Bajrami (Dessers, 46), Cerny, Hagi (Ridvan, 60) Igamane.
Subs: Butland, McCausland, Curtis
Queen’s Park: Ferrie, Mauchin, Scott (Montgomery, 72), Welsh, Ujdur, Longridge, Hurst Drozd, 67), TIzzard, Rudden, Turner, Duncan.
Subs: Wills, Hinds, Raymond, Evans, Hickey-Fugaccia, McGarva.