Celtic and Rangers both learned of their Premier Sports Cup fate after the pair were drawn for the last 16 of the competition.
The Glasgow pair entered the hat for the last 16 draw alongside Hibs, Aberdeen and St Johnstone because of European participation.
Celtic will face Hearts at home in the last 16 of the competition, following Hearts' 1-0 victory against Inverness that saw them miss out on a seeded spot in the competition.
The Jambos won all of their group stage matches without conceding a single goal, although missed out on a seeded spot in the last 16.
Robbie Neilson's side will test Ange Postecoglou's Celtic, in what will be the Aussie's first domestic cup game in Scotland.
The match will come just two weeks after the two sides entertain each other at Tynecastle in the season opener.
Celtic have won the competition on 19 occasions and most recently lifted the trophy in the 2019/20 campaign.
Rangers have been drawn at home to Dunfermline Athletic as Steven Gerrard's side look to win the competition for the first time since the 2010/11 season.
The Gers have won this competition more than any other side, having lifted the trophy on a staggering 27 occasions.
Elsewhere in the draw Arbroath host St Johnstone, Hibs face Kilmarnock at Easter Road, Ayr host Dundee United, Raith Rovers face Aberdeen, Dundee host Motherwell at Dens Park and Livingston take on St Mirren.
The matches will take place on either the 14th or 15th of August.
Draw in full-
Celtic vs Hearts
Rangers vs Dunfermline
Arbroath vs St Johnstone
Hibs vs Kilmarnock
Ayr vs Dundee United
Raith Rovers vs Aberdeen
Dundee vs Motherwell
Livingston vs St Mirren