Part of Chesterfield's promotion-winning side in League Two this season, the 31-year-old was offered a new deal with the Spireites.
He has opted however to re-sign for the club he first joined in 2003, going on to make 42 starts for the Cobblers and score 13 goals.
Speaking to BBC Radio Northampton, Richards said: "I want to get as many promotions as I can before I hang my boots up and, hopefully, I can help Northampton get some good memories."