Kelty Hearts’ reward for knocking out Scottish Cup holders St Johnstone is a last-16 trip to face in St Mirren.
The runaway League 2 leaders beat the Scottish Premiership strugglers 1-0 after extra time in Fife.
There are two all-Premiership ties, with Motherwell hosting Aberdeen and Hearts welcoming Livingston.
Celtic will play Championship Raith Rovers, while Rangers travel to League 2 Annan Athletic, with the ties played on the weekend of 12/13 February.
Second tier leaders Arbroath will welcome Hibernian, Dundee United visit Partick Thistle, and Dundee go to Peterhead.
Scottish Cup fifth-round draw: Motherwell v Aberdeen, Celtic v Raith Rovers, Arbroath v Hibernian, Annan Athletic v Rangers, Hearts v Livingston, Peterhead v Dundee, Partick Thistle v Dundee United, St Mirren v Kelty Hearts.