League Two side Stanley have been rewarded for Tuesday night's victory over Doncaster with a home tie against the north east giants.
Accrington made the headlines last year when they reached the fourth round of the FA Cup before losing 3-1 to Fulham.
Everton were handed a tricky draw at home to League One promotion hopefuls Huddersfield while Sunderland will host Colchester.
MK Dons will hope to cause an upset when they host Blackpool while their fellow Barclays Premier League newcomers West Brom travel to Leyton Orient.
Hartlepool, 2-0 winners over Sheffield United in round one on Wednesday night, will fancy their chances of another upset at home to Wigan.
Of the other Premier League teams in action, Wolves host Southend, Blackburn face Norwich, Birmingham entertain Rochdale and West Ham welcome Football League newcomers Oxford.
Bolton look to have a tricky tie away at Southampton while Fulham face Port Vale and Stoke host Shrewsbury.
Portsmouth and Crystal Palace will be able to commiserate over their financial woes when they meet at Fratton Park while other notable ties include Leeds v Leicester, Brentford v Hull, and Middlesbrough's visit to Millwall.
The matches will be played in the week commencing August 23.
Second round draw in full:
Accrington v Newcastle, Portsmouth v Crystal Palace, Leeds v Leicester, Wolves v Southend, Blackburn v Norwich, MK Dons v Blackpool, Tranmere v Swansea, Everton v Huddersfield, Peterborough v Cardiff, Reading v Northampton, Scunthorpe v Sheffield Wednesday, Brentford v Hull
Sunderland v Colchester, Leyton Orient v West Brom, Morecambe v Burnley, Birmingham v Rochdale, Crewe v Ipswich, Watford v Notts County, West Ham v Oxford, Southampton v Bolton, Bradford v Preston, Fulham v Port Vale, Millwall v Middlesbrough, Stoke v Shrewsbury, Hartlepool v Wigan.