Hibs will play Ross County at home in the Second Round of the Betfred Cup, in a repeat of the 2016 final.
Neil Lennon’s men were spared the group stages this year due to European qualification.
Hearts travel to East End Park to face Dunfermline Athletic after qualifying with a comprehensive 5-0 win over Inverness Caledonian Thistle at Tynecastle yesterday.
The draw was made immediately after the final whistle by BT Sport pundits Chris Sutton and Michael Stewart.
Ties will be played on the weekend of the 18th/19th August – fixture and ticket details will be confirmed in due course.
The full draw is as follows:
Livingston v Motherwell
Dundee v Ayr United
Dunfermline v Hearts
Kilmarnock v Rangers
Aberdeen v St Mirren
Partick Thistle v Celtic
Hibernian v Ross County
Queen of the South v St Johnstone
John graduated from Telford College in 2010 with an HNC in Practical Journalism and since then he worked for the North Edinburgh News, The Southern Reporter, the Irish News Review and The Edinburgh Reporter. In addition he has been published in the Edinburgh Evening News and the Hibernian FC Programme.