Frampton, who was born in Wimbledon, made 30 League Two appearances as the Gills clinched promotion last season.
However, the 33-year-old was released at the end of the campaign, allowing him to join the Dons on a free transfer.
"It means a lot to me to sign for Wimbledon because I grew up nearby and I know about the history of the football club," Frampton told the club's official website.
"When I played against Wimbledon for Gillingham at the end of last season the fans created a lot of noise and it ended up a good day for both clubs.
"Once Neal sold the club to me and what he wanted to achieve it was a no-brainer to sign and I am excited by the challenge ahead."
Frampton's previous employers include Crystal Palace, Brentford and Millwall.