The Cobblers will travel to Sky Bet League Two leaders Lincoln City in the FA Cup first round.
Keith Curle’s men will travel to Sincil Bank on the weekend of November 10/11.
The two teams have already met in the league this season, with the Imps winning 1-0 at the PTS Academy Stadium on the opening day of the campaign.
Cobblers have never played Lincoln in the FA Cup.
The draw was broadcast live on BBC2 television, with the show being hosted by Mark Chapman.
The home teams were drawn out by former Chelsea and England midfielder Dennis Wise, with former Manchester United and Aston Villa man Dion Dublin doing the honours for the away team.
Hitchin Town FC’s Top Field ground was the venue, with the Southern Premier League side in the draw following their 1-1 stalemate with Isthmian League Premier side Leatherhead, who famously saw off the Cobblers in a Cup shock back in 1976.
The Cobblers will be hoping to improve on last season’s performance in the Cup, when they went out at the first round stage to Scunthorpe United.
FA Cup first round draw
Haringey Borough vs AFC Wimbledon
Maidstone United vs Macclesfield Town
Ebbsfleet United vs Cheltenham Town
Hampton and Richmond Borough vs Oldham Athletic
Swindon Town vs York City
Mansfield Town vs Charlton Athletic
Torquay United vs Woking
Scunthorpe United vs Burton Albion
Port Vale vs Sunderland
Aldershot Town vs Bradford City
Grimsby Town vs MK Dons
Chorley vs Doncaster Rovers
Alfreton Town vs Fleetwood Town
Bromley vs Peterborough United
Southport vs Boreham Wood or Dagenham and Redbridge
Plymouth Argyle vs Stevenage
Chesterfield vs Billericay Town or Taunton Town
Lincoln City vs Northampton Town
Barnet vs Bristol Rovers
Yeovil Town vs Stockport County
Bury vs Dover Athletic
Gillingham vs Hartlepool
Oxford United vs Forest Green Rovers
Tranmere Rovers vs Hemel Hempstead or Oxford City
Accrington Stanley vs Colchester United
Barnsley vs Notts County
Shrewsbury Town vs Salford City
Met Police vs Newport Town
Walsall vs Coventry
Rochdale vs Gateshead
Hitchin Town or Leatherhead vs Solihull Moors
Sutton United vs Slough Town
Guiseley vs Cambridge United
Exeter City vs Blackpool
Luton Town vs Wycombe Wanderers
Morecambe vs Warrington Town or Halifax Town
Crewe Alexandra vs Carlisle United
Southend vs Crawley Town
Chippenham or Maidenhead United vs Portsmouth
Weston-Super-Mare vs Harrogate Town or Wrexham