Potter will link up once again with Cobblers manager Chris Wilder, whom he spent time under at Oxford.
The 26-year-old joined Wimbledon in January 2014 but was told his contract would not be renewed in the summer.
He becomes Town’s first summer signing and told the club’s website: “I’ve had a bit of an up and down year to be honest and just wanted to settle down again.
“I had a really good few years under the gaffer at Oxford and I really wanted to play for him again and play for Northampton. When he offered me the contract it was kind of a no-brainer for me.
“I was at Oxford for five-and-a-half years and it’s nice to be settled somewhere and that’s what I was looking for again. And I thought Northampton was my best option for that.”