Last season’s runners-up Liverpool will begin their EFL Cup campaign away at Championship side Burton Albion.
Manchester City beat Jurgen Klopp’s side 3-1 on penalties after a 1-1 draw at Wembley to win the cup last season.
Chelsea will face either Bristol Rovers or Bristol City, while Ronald Koeman’s Everton will host League Two Yeovil.
Thirteen Premier League clubs – all of whom are seeded – join the competition in round two, as do Newcastle United and Norwich City.
The seven top-flight clubs involved in European competitions will come in for the third round.
There were also home ties for Watford, Sunderland and Crystal Palace, who begin against Gillingham, Shrewsbury and Blackpool respectively.
Bournemouth face a long midweek trip to League Two Morecambe, while Premier League newcomers Hull will visit Exeter.
All ties are to be played the week commencing 22 August.
EFL Cup second-round draw
QPR v Rochdale
Scunthorpe v Cardiff/Bristol City* (see note below)
Watford v Gillingham
Peterborough v Swansea
Everton v Yeovil
Millwall v Nottingham Forest
Sunderland v Shrewsbury
Luton v Leeds
Chelsea v Bristol Rovers/Bristol City* (see note below)
Burton v Liverpool
Blackburn v Crewe
Accrington v Burnley
Crystal Palace v Blackpool
Morecambe v Bournemouth
Preston v Oldham
Oxford v Brighton
Reading v MK Dons
Fulham v Middlesbrough
Newcastle v Cheltenham
Exeter v Hull
Derby v Carlisle
Northampton v West Brom
Wolves v Cambridge
Stevenage v Stoke
Norwich v Coventry
*Bristol Rovers’ match against Cardiff City on Thursday will affect the draw seedings. If Cardiff win, they will be seeded and will visit Scunthorpe United, with Bristol City going to Chelsea. If Bristol Rovers win, they will be unseeded and will be away to Chelsea, with Bristol City away to Scunthorpe.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.