Celtic face a trip to the scene of their biggest Scottish Cup shock in the fifth round of this season’s competition.
The holders take on Clyde at Broadwood, where they lost in 2006 as Roy Keane made his debut.
Lasy season’s defeated finalists, Hearts, were drawn away to the winners of the Arbroath v Falkirk fourth-round tie.
Rangers will travel to Hamilton while Lowland League side BSC Glasgow have been drawn at home against Hibernian or Dundee United.
The full draw:
Inverness Caledonian Thistle v Livingston
Clyde v Celtic
BSC Glasgow v Dundee United or Hibernian
St Mirren v Motherwell
Ayr United v St Johnstone
Aberdeen v Kilmarnock
Hamilton Academical v Rangers
Arbroath or Falkirk v Heart of Midlothian
The ties are set to take place on the weekend of 8 February, 2020.