Aberdeen will take on Dundee at Dens Park in the second round of the Betfred Cup, while Ross County will travel to Firhill to take on Partick Thistle.
The Dons, who were beaten in the final of last year’s final by Celtic, will take on James McPake’s Dee after they defeated Caley Thistle 1-0 to progress as Group D winners.
Celtic, Rangers, Aberdeen and Kilmarnock did not have to participate in the group stages because they were involved in European football.
Ross County advanced to the knockout stages by winning all four group games in Group B.
Hibernian will host Morton, Motherwell meet Hearts and holders Celtic take on Dunfermline.
East Fife’s reward for reaching the last 16 of the competition is a home tie against Rangers, while Kilmarnock face Hamilton and Forfar meet Livingston.
The ties will be played on the weekend of August 17 and 18.
Betfred Cup second round draw
Hibernian v Morton
Partick Thistle v Ross County
Motherwell v Hearts
Dundee v Aberdeen
Celtic v Dunfermline
Forfar v Livingston
Kilmarnock v Hamilton
East Fife v Rangers