The Hoops earned a home tie on the weekend of February 8/9 after their 7-0 demolition of Hearts at Tynecastle on Sunday.
The Parkhead showdown is the only all-Premiership clash although another could be on the cards at Tannadice if St Mirren get the better of Queen of the South in next week's replay.
Albion Rovers' reward for pulling off the shock of the fourth round - a 1-0 victory over Premiership side Motherwell - is a home tie against Stenhousemuir while Alloa, who saw off local rivals Stirling Albion 3-2 at the weekend, have another home tie against Championship side Dumbarton.
Former Rangers striker Kenny Miller conducted the draw at the SFA's Hampden HQ and he answered the prayers of his old team-mates when handing them a home tie against the winners of the Ayr United v Dunfermline replay.
Reflecting on the draw, Rangers striker Nicky Clark told Sky Sports News: "We were hoping for a home tie and we were lucky enough to get that but it will be a tough game.
"Either of those teams will come to Ibrox to try and cause an upset so we will have to make sure we are prepared for that.
"We have already beaten them both in the league this season so that gives us a bit of confidence, but we have a lot of confidence just now anyway as we are doing really well in the league and hopefully we can take that into the Scottish Cup."
Alloa Athletic v Dumbarton
Clyde or Stranraer v Inverness
Hibernian v Raith Rovers
Albion Rovers v Stenhousemuir
Brechin or Forfar v St Johnstone
Celtic v Aberdeen
Dundee United v Queen of the South or St Mirren
Rangers v Ayr or Dunfermline