Hearts will travel to Dunfermline in the second round of the Betfred Cup, while Hibs will host Ross County.
The Jambos secured their passage into the draw with a thumping 5-0 win at home to Inverness on Sunday afternoon, topping their group in the process, and will travel to Fife to play the Championship club.
Hibs enter the competition in this round due to their participation in the Europa League and will be pleased to have a home draw against a Championship outfit.
The ties will be played over the weekend of August 18.
Betfred Cup second round draw: Livingston v Motherwell; Dundee v Ayr United; Dunfermline v Hearts; Kilmarnock v Rangers; Aberdeen v St Mirren; Partick Thistle v Celtic; Hibs v Ross County; Queen of the South v St Johnstone.