The last-16 kept the Old Firm apart, but third-division Rangers face a tough test at Tannadice against top-flight opposition.
Celtic must first negotiate a replay against Arbroath, who held them at the weekend, before turning their attention to an away fixture at Raith.
The only other confirmed fixture sees Falkirk tackle Forfar Athletic.
The winner of Aberdeen's fourth round tie against Motherwell face a daunting trip to Hibernian, who currently lie second in the SPL.
SCOTTISH CUP FIFTH ROUND DRAW
Raith Rovers v Celtic or Arbroath
St Mirren v Cowdenbeath or St Johnstone
Dunfermline v Dumbarton or Hamilton
Hibernian v Aberdeen or Motherwell
Falkirk v Forfar Athletic
Dundee United v Rangers
Dundee v Turriff United or Greenock Morton
Kilmarnock v Ross County or Inverness CT
Ties to be played on February 2
- Sports & Recreation