Sunday 31 July 2016 18:07, UK
Celtic will start their Betfred Cup campaign with a second round tie at home to Motherwell, while Rangers were drawn to play Peterhead at Ibrox.
Brendan Rodgers' side were handed one of two all-Premiership ties, with St Johnstone also hosting Hearts in the last 16.
Rangers face a repeat of last year's Challenge Cup final when they welcome Peterhead to Glasgow, with Mark Warburton's side winning that clash 4-0 at Hampden.
Ayr United's reward for finishing second in Group G in the revamped League Cup is a home game against last year's Premiership runners-up Aberdeen, while surprise Group D winners Alloa welcome Inverness to The Indodrill Stadium.
Relegated from the Premiership last season, Dundee United have been handed an intriguing tie at home to Partick Thistle, while Neil Lennon's Hibernian host Queen of the South at Easter Road and Hamilton face Group H winners Greenock Morton.
The eight seeded clubs were Celtic, Aberdeen, Hearts and Hibernian, with Rangers, Partick Thistle, Alloa and Greenock Morton also seeded as the best-placed group winners.
Before the draw on Sunday Dundee United booked their place in the next round after they beat Dunfermline 2-0 at Tannadice to make sure of the runners-up spot in Group C, with second half goals from Simon Murray and Scott Fraser clinching the win.
There were early League Cup exits for Premiership sides Dundee, Kilmarnock and holders Ross County.
Scottish League Cup second round draw:
Rangers v Peterhead
Dundee United v Partick Thistle
Celtic v Motherwell
Hamilton v Greenock Morton
Hibernian v Queen of the South
St Johnstone v Hearts
Alloa v Inverness Caledonian Thistle
Ayr United v Aberdeen
Second round ties will be played on August 9, 10 and 11.