Dundee United and Ross County, who contested last year's Scottish Cup final, will meet at the fourth-round stage of this season's tournament.
First Division Dundee will welcome Motherwell, while Third Division Berwick Rangers will play Celtic.
There are two all-Scottish Premier League ties - Rangers host Kilmarnock and Hearts take on St Johnstone.
If Threave Rovers can progress past Stenhousemuir, they will play host to Third Division leaders Stranraer.
Aberdeen v East Fife
Berwick Rangers v Celtic
Dundee v Motherwell
Dundee United v Ross County
East Stirlingshire v Buckie Thistle
Falkirk v Partick Thistle
Hamilton Accies v Alloa Athletic
Hearts v St Johnstone
Hibernian v Ayr United
Inverness CT v Elgin City
Montrose v Dunfermline
Morton v Airdrie or Beith
Queen of the South v Brechin or Annan
Rangers v Kilmarnock
Stenhousemuir or Threave Rovers v Stranraer
St Mirren v Peterhead
The ties will be played on 8 and 9 January.
First Division Dundee will welcome Motherwell, while Third Division Berwick Rangers will play Celtic.
There are two all-Scottish Premier League ties - Rangers host Kilmarnock and Hearts take on St Johnstone.
If Threave Rovers can progress past Stenhousemuir, they will play host to Third Division leaders Stranraer.
Aberdeen v East Fife
Berwick Rangers v Celtic
Dundee v Motherwell
Dundee United v Ross County
East Stirlingshire v Buckie Thistle
Falkirk v Partick Thistle
Hamilton Accies v Alloa Athletic
Hearts v St Johnstone
Hibernian v Ayr United
Inverness CT v Elgin City
Montrose v Dunfermline
Morton v Airdrie or Beith
Queen of the South v Brechin or Annan
Rangers v Kilmarnock
Stenhousemuir or Threave Rovers v Stranraer
St Mirren v Peterhead
The ties will be played on 8 and 9 January.