Ross County and St Johnstone only Premiership sides drawn together in League Cup
Promoted Ross County face St Johnstone in the only group with two Scottish Premiership sides after the draw for the opening stage of the League Cup.
Hearts, beaten semi-finalists in October, are drawn in the same group as Dundee United, who missed out on promotion in the play-off final.
Relegated Dundee and Inverness Caledonian Thistle are in the only group without a top-flight side.
Holders Celtic, Rangers, Kilmarnock and Aberdeen have byes to the second round.
The top-four sides in the Premiership will be involved in the qualifying stages of the Champions League and Europa League when the League Cup begins on the weekend of 13 July.
They will be joined in the second round by the eight group winners and the four best runners-up when the first round concludes on 27 July.
Top-flight Hibernian will face four part-time teams - Alloa Athletic, Stirling Albion, Elgin City and League One champions Arbroath.
League Two newcomers Cove Rangers, the Highland League champions who defeated Berwick Rangers in a play-off to enter the Scottish Professional Football League for the first time, are in the same group as Dundee and Caley Thistle.
Berwick, who will be playing in the Lowland League next season, are in the same group as Livingston, Ayr United, Stranraer and Falkirk.
Lowland League champions East Kilbride join St Mirren, Dunfermline Athletic, Albion Rovers and Edinburgh City in Group H.
Group F has a host of derbies as it thrusts together Lanarkshire neighbours Hamilton Academical and Airdrieonians, plus Glasgow sides Partick Thistle and Queen's Park, as well as Clyde, who were based in the city and ground-shared with Hamilton and Thistle before moving to Cumbernauld.
The draw means Dundee United head coach Robbie Neilson will be facing the club where he began his managerial career - Hearts.
Meanwhile, Group B brings Ross County up against the side, St Johnstone, who ensured their relegation two seasons ago after a 1-1 draw in Perth.
Scottish League Cup, first-round draw
Group A: Hearts, Dundee United, East Fife, Stenhousemuir, Cowdenbeath
Group B: St Johnstone, Ross County, Forfar Athletic, Brechin City, Montrose
Group C: Hibernian, Alloa Athletic, Stirling Albion, Arbroath, Elgin City
Group D: Dundee, Inverness Caledonian Thistle, Raith Rovers, Peterhead, Cove Rangers
Group E: Motherwell, Greenock Morton, Queen of the South, Annan Athletic, Dumbarton
Group F: Hamilton Academical, Partick Thistle, Airdrieonians, Queen's Park, Clyde
Group G: Livingston, Ayr United, Stranraer, Berwick Rangers, Falkirk
Group H: St Mirren, Dunfermline Athletic, Albion Rovers, Edinburgh City, East Kilbride