Holders Hearts have been drawn away to Edinburgh rivals Hibernian in a repeat of last season's final after the Scottish Cup fourth-round draw.
Ross County host Inverness Caledonian Thistle in another local derby and, in the third all-Scottish Premier League tie, Motherwell visit Aberdeen.
SPL leaders Celtic host the winners of the replay between Arbroath and Highland League side Inverurie Locos.
Rangers face fellow Third Division side Elgin City at Ibrox.
With the two Old Firm clubs drawn at home, one is destined to be on Saturday and the other on Sunday over the weekend of 1 and 2 December.
Hibs captain James McPake declared the outcome as the perfect draw, giving the Easter Road side the chance to avenge May's 5-1 Hampden hammering.
"It's the tie we all wanted," the defender told his club website. "First and foremost, we're just happy to have a home tie and it will be a massive game against Hearts.
"I had a feeling we would get them and it's a game everybody is looking forward to being a part of.
"But, firstly, we've got to build on our positive start to the SPL season - continuing with Dundee United at home on Sunday."
Hearts manager John McGlynn, who replaced cup-winning manager Paulo Sergio in June, was equally impassioned by the derby tie.
"I'm looking forward to a very exciting Scottish Cup derby game," he told his club website.
"It's quite strange with the cup final and then the first time the two clubs come back into it we face each other in the first game.
"It's surreal and remarkable, but that's how it is.
"It's one that we'll look forward to: management team, players and fans alike. Everyone will look forward to it. It's exciting stuff."
Turriff United, who are playing in the Scottish Cup for the first time, will host either First Division side Morton or Albion Rovers from Division Two.
The other Highland League side already through to the fourth round, Deveronvale, are away to First Division opponents.
Vale will face a trip to Kirkcaldy or Lanarkshire depending on who wins the replay between Raith Rovers and Airdrie United.
Partick Thistle and Dunfermline Athletic, tied at the top of Division One and due to face one another on Saturday, have been drawn together, with the Glasgow side again having home advantage.
East Superleague champions Bonnyrigg Rose, the only surviving representative from the junior ranks, can set up a glamour tie away to SPL side St Mirren should they win their home replay against Second Division outfit Brechin City.
Kilmarnock are at home to Second Division leaders Queen of the South, while the SPL's three representatives from Tayside all face away ties.
Dundee face Livingston, St Johnstone are up against another First Division side, Cowdenbeath, while Dundee United await the replay between Second Division strugglers Stranraer and Third Division Queen's Park.
Should the Spiders defeat the Blues at Hampden, it would mean that all four Glasgow clubs would be at home.
The fourth round is being played earlier than usual in order to accommodate the SPL's mini-winter break in January.
Scottish Cup fourth-round draw
Aberdeen v Motherwell
Partick Thistle v Dunfermline Athletic
Kilmarnock v Queen of the South
Hibernian v Hearts
Airdrie United or Raith Rovers v Deveronvale
Turriff United v Albion Rovers or Morton
Livingston v Dundee
Rangers v Elgin City
Forfar Athletic or Nairn County v Ayr United
Ross County v Inverness Caledonian Thistle
Celtic v Inverurie Locoworks or Arbroath
Dumbarton v Hamilton Academical
Cowdenbeath v St Johnstone
Stranraer or Queen's Park v Dundee United
Stenhousemuir or Berwick Rangers v Falkirk
St Mirren v Brechin City or Bonnyrigg Rose
Matches to be played on the weekend of 1/2 December