Celtic will begin their defence of the Viaplay Cup with a last-16 tie away to cinch Premiership rivals Kilmarnock after the draw was made on Sunday.
The match is a re-run of last year’s semi-final, which the Hoops won 2-0 at Hampden in January.
Rangers, who lost to Celtic in the final in March, begin their campaign at home to Championship side Morton.
Edinburgh pair Hearts and Hibernian have also been given home ties against second-tier opponents in the shape of Partick Thistle and Raith Rovers respectively.
Another all-Premiership affair will take place in Paisley after 2013 winners St Mirren were drawn at home to Motherwell.
Stirling Albion, who qualified after a stunning 4-0 win away to St Johnstone on Saturday, will be hoping to cause another upset when they host Aberdeen.
Championship new boys Airdrie, the only club to come through the group stage with a perfect record, host 2016 winners Ross County, while Livingston will welcome Ayr to West Lothian.
The ties will be played on the weekend of 19/20 August.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country