He becomes the first National League player to step up into the EFL in the close season.
The forward turned down a new deal and joins the Cobblers after winning promotion.
He scored 18 goals this season as he helped fire County to the National League North title.
“Striker Matty Warburton has left County to sign for League Two outfit Northampton Town,” a statement read.
“He rejected the offer of a new deal at Edgeley Park.
“The club would like to thank Matty for his efforts over the last two years and wish him well for the future.”