Meanwhile, Albion Rovers, who knocked out Motherwell in the previous round, will face Stenhousemuir at home.
The draw in full:
Alloa Athletic vs. Dumbarton
Clyde or Stranraer vs. Inverness Caledonian Thistle
Hibernian vs. Raith Rovers
Albion Rovers vs. Stenhousemuir
Brechin City or Forfar Athletic vs. St Johnstone
Celtic vs. Aberdeen
Dundee United vs. Queen of the South or St Mirren
Rangers vs. Ayr United or Dunfermline Athletic
The ties will be played on the weekend of February 8.