The Gers got off to a perfect start against their Scottish Premiership opponents as Harry Forrester fired them in front after just 13 seconds as he scored for the third successive game.
The second half started in similar fashion as Jason Holt headed home to make it 2-0 only 85 seconds after the break.
The fallen Glasgow giants, who are 14 points ahead of Hibernian in their bid to gain promotion back to the Premiership, added a third in the 54th minute through Andy Halliday's fantastic free-kick.
Lee Wallace then scored a fine solo goal in the 84th minute as Dundee's eight-match unbeaten run came to an end.
The result sets up a potential Old Firm semi-final with rivals Celtic, who take on Championship side Morton at Parkhead on Sunday.
Rangers manager Mark Warburton said it had been a pleasing performance.
"It was a big challenge and we knew the danger they posed but from the outset. We wanted to start fast and maintain our tempo and our intensity and obviously we got the early goal which was tremendous," Warburton said.
"I thought in the first 35 minutes we played super stuff and the challenge was to take that into the second period and I thought we did that."
Dundee manager Paul Hartley was understandably disappointed with his side's start.
"We have got to be honest with ourselves and say Rangers totally deserved to win today and we didn't perform," Hartley added.
Dundee had held Scottish champions Celtic at bay for the full 90 minutes on Wednesday but it took just 13 seconds for their defence to be breached by Championship leaders Rangers.
Dundee midfielder Kevin Holt lost possession soon after the kick-off and Forrester seized on the opportunity to glide past a couple of challenges before rifling a powerful right-foot strike past Scott Bain at his near post.
The explosive start for Rangers continued as James Tavernier forced Bain into a save with a fierce strike before Holt headed Forrester's cross against his own post.
A great move from the home side saw Holt head in a second for Rangers just 85 seconds after the break. Forrester's pass was chested down by Barrie McKay for Kenny Miller whose cross was nodded past Bain by Holt from close range.
The Gers were dominant and added a third in the 54th minute. Regular free-kick taker Tavernier ran over the ball before Halliday sent a low curling effort round the Dundee wall that Bain couldn't keep out despite getting a touch.
They added a stunning fourth in the 84th minute as captain Wallace turned Dundee defenders Paul McGowan and Darren O'Dea inside out before slotting the ball low below Bain.
Rangers will be joined in Sunday's semi-final draw by Dundee United who, despite being reduced to ten men, twice came from behind to claim a dramatic 3-2 win over Ross County at Victoria Park.
Liam Boyce headed home the opener in the 24th minute before Henri Anier grabbed a 57th-minute equaliser.
However, United defender Mark Durnan saw red three minutes later for a foul on Brian Graham, who despatched the resultant penalty for County.
United were soon on level terms when Anier equalised again before Billy McKay's header a minute from time sealed a dramatic comeback.
"The fighting spirit when we were down to 10 men was excellent," United manager Mixu Paatelainen said.
"All credit to the boys, the shift they put in was unbelievable."