Pat Fenlon's side, who lost 5-1 in the all-Edinburgh final in May, host their city rivals at Easter Road over the weekend of 1-2 December.
The draw, made at Hampden by former Celtic striker Jan Vennegoor of Hesselink, threw up another two all-Premier League ties with Aberdeen entertaining Motherwell and Inverness making the short journey to Ross County.
The winners of Inverurie Locos and Arbroath will be rewarded with a lucrative trip to Celtic while Rangers, 7-0 winners over Alloa last weekend, entertain fellow third-division side Elgin City.
Aberdeen v Motherwell
Partick Thistle v Dunfermline
Kilmarnock v Queen of the South
Hibernian v Hearts
Airdrie United or Raith Rovers v Deveronvale
Turriff Utd v Albion Rovers or Morton
Livingston v Dundee
Rangers v Elgin City
Forfar or Nairn County v Ayr United
Ross County v Inverness
Celtic v Inverurie Locos or Arbroath
Dumbarton v Hamilton
Cowdenbeath v St Johnstone
Stranraer or Queens Park v Dundee Utd
Stenhousemuir or Berwick v Falkirk
St Mirren v Brechin or Bonnyrigg Rose
Ties to be played weekend of 1-2 December.