Celtic could face another meeting with cup bogey side Inverness in the fifth round of the William Hill Scottish Cup.
Inverness, who have twice knocked Celtic out of the tournament this century, will host Neil Lennon's side if they beat Dunfermline in an East End Park replay.
Rangers will face 2010 winners Dundee United at Ibrox.
St Johnstone will be looking to beat Hearts at Tynecastle for the second year running.
The draw, conducted by Chelsea manager Andre Villas-Boas and former Italy coach Marcello Lippi, gave Hibernian a home game against Dundee or Kilmarnock.
Aberdeen have a chance to avenge their 2008 semi-final defeat by Queen of the South when they host the Dumfries side.
Motherwell welcome Morton to Fir Park while Irn-Bru First Division leaders Ross County will visit the winners of the replay between St Mirren and Hamilton.
There is one all-First Division clash with Scottish Communities League Cup semi-finalists Ayr and Falkirk meeting at Somerset Park.
The ties will be played on February 4-5.