Drawn in the Northern Section East for the opening stages of the competition, the Cobblers will play away against Hartlepool United of League One.
The two sides last met in January 2009, Hartlepool running out 2-0 winners in a League One fixture.
The first-round ties are scheduled to be played on Tuesday, August 31.