Hearts will face former player and head coach Robbie Neilson’s Dundee United side in the Betfred Cup.
The Tynecastle encounter looks the highlight of the group stage, which takes place over three weekends and two midweeks from July 13-28.
United will face an interesting test of their close-season transfer activity as Neilson looks to build a team capable of getting promotion at the fourth time of asking. East Fife, Stenhousemuir and Cowdenbeath complete Group A.
Hibernian will face four part-time teams in Alloa, Stirling, Elgin and Ladbrokes League One champions Arbroath.
Motherwell take on familiar opposition in the shape of three teams they have played in the past three group stages – Morton, Queen of the South and Annan. Dumbarton make up Group E.
Championship winners Ross County will get a taste of Premiership opposition when they travel to face St Johnstone. There will also be three Angus derbies in Group B, with Forfar, Brechin and Montrose drawn together.
St Mirren will face Lowland League champions East Kilbride, along with Dunfermline, Albion Rovers and Edinburgh City.
There are a host of derbies in Group F with Lanarkshire teams Hamilton, Airdrie and Clyde drawn along with Glasgow pair Partick Thistle and Queen’s Park.
Livingston will play Ayr, Stranraer and Falkirk, along with Berwick – who lost their league status with a 7-0 aggregate defeat by Cove.
Relegated Dundee take on new Championship rivals Inverness, as well as Raith Rovers, Peterhead and Highland League champions Cove.
The draw was split into north and south sections, with the eight group winners joining the four best runners-up and European qualifiers Celtic, Rangers, Kilmarnock and Aberdeen in the second round.
The top seeds will host the second seeds with the other venues for games being decided in the coming days.