Peterhead will be aiming to repeat their 2-1 Ibrox win over Rangers from the team’s last meeting, a Third Division contest in April 2013. Rory McAllister, who remains with the Blue Toon, netted the winner.
Hearts, the only Premiership team in the first round, were picked out to face Arbroath at home in the seeded draw.
Hibernian host Montrose while Championship newcomers St Mirren sit out the first round.
The draw has thrown up three derbies - Falkirk host East Stirlingshire, Queen of the South travel to Annan while Dunfermline and Cowdenbeath meet at East End Park.
The games are due to take place on August 1 but Rangers are likely to have their game moved as Celtic host Ross County in the Premiership opener on that day.
Hearts will also need to find a different date as they begin their Premiership campaign against St Johnstone on the Sunday of that weekend.
Rangers and Hibs begin their campaigns with a Petrofac Training Cup clash at Easter Road on July 25.
Scottish League Cup first round draw
Falkirk v East Stirlingshire
Berwick Rangers v Alloa Athletic
Hearts v Arbroath
Stirling Albion v Airdrieonians
Raith Rovers v Albion Rovers
Annan Athletic v Queen of the South
Livingston v Clyde
Dunfermline Athletic v Cowdenbeath
Hibernian v Montrose
East Fife v Dumbarton
Greenock Morton v Elgin City
Queen’s Park v Forfar Athletic
Stranraer v Stenhousemuir
Ayr United v Brechin City
Rangers v Peterhead