Scottish Cup holders Celtic will face Hearts at Tynecastle in the fourth round of this season's competition.
Sir Alex Ferguson conducted the draw and picked out Partick Thistle as opponents for his former club Aberdeen.
Last season's beaten finalists Hibernian will travel to Dingwall to play Ross County.
Dundee United host their Scottish Premiership rivals Kilmarnock, St Mirren will travel to Queen of the South and Rangers visit Falkirk.
Ferguson, 71, played for both Rangers and Falkirk, and the Ibrox side knocked the Bairns out of the League Cup and Challenge Cup last season.
The former Manchester United manager also spent time at Ayr United and Dunfermline as a striker, and the League One rivals meet at Somerset Park.
St Johnstone, another of Ferguson's former teams, are at home to Livingston.
Motherwell face a short trip to Albion Rovers and there are other local derbies between Brechin and Forfar and Alloa and Stirling Albion.
Inverness CT take on Morton while Highland League outfit Fraserburgh will go to either Stenhousemuir or Annan Athletic.
Junior sides Culter and Auchinleck Talbot remain in the tournament but face replays against Berwick Rangers and Stranraer, respectively, to see if they reach the fourth round.
All ties will be played on the weekend of 30 November and 1 December.
"In my time I thought it was the best tournament to win in terms of cups," said former Dons manager Ferguson.
"If you are involved in the Scottish Cup, you cherish it, there is no question about that."
Scottish Cup fourth round draw:
Falkirk v Rangers
Albion Rovers v Motherwell
Culter or Berwick Rangers v Dumbarton
Clyde v Stranraer or Auchinleck Talbot
Dundee United v Kilmarnock
Queen of the South v St Mirren
Stenhousemuir or Annan Athletic v Fraserburgh
Brechin City v Forfar Athletic
Alloa Athletic v Stirling Albion
Ross County v Hibernian
Dundee v Raith Rovers
St Johnstone v Livingston
Partick Thistle v Aberdeen
Hearts v Celtic
Ayr United v Dunfermline
Inverness Caledonian Thistle v Morton