Chesterfield to host League One leaders Portsmouth in FA Cup first round
Cook took charge at Fratton Park in 2015 and he led them to the League Two title in 2017 before departing for Wigan Athletic.
Pompey, managed by John Mousinho, are currently top of League One after 12 games and are unbeaten.
The Spireites beat Kettering Town 5-0 in the fourth qualifying round on Saturday, earning themselves £9,375 in prize money.
Winners of first round ties, to be played between November 3-6, get £40,000.
Chesterfield have reached the third round in the last two seasons.
Town are back in action on Saturday at home to Gateshead.