The 21-year-old has penned a two-year deal at the Weston Homes Stadium after completing the necessary paperwork.
Hamilton, who has League One experience following loan spells with Rochdale, Southend United and Bolton Wanderers in the last 18 months, becomes Darren Ferguson's second signing of the summer following the arrival of goalkeeper Dan Gyollai.
Ferguson was pleased to secure the signature of Hamilton, a player he has kept a close eye on over the last 12 months.
He told the club's website, “I have followed his progress over the last 12 months. He has had a number of loan spells in this league and he is someone I have liked for a while if I am honest.
“He is a good size, a lovely footballer, left-footed and I think he will fit in really well. We enquired about getting him on-loan previously, but something happened at Manchester United and it didn't materialise, so it is great to get it done now. He is on a free now and I think he will be a good signing for us."
Hamilton is excited about the next chapter in his career.
“I am really looking forward to it, when I spoke with the manager, he just reaffirmed what I was thinking, that this is the right place for my development. Peterborough play great football; I knew that anyway and playing against them last season demonstrated that even more.
“I have had a few loan spells within the league, but it is nice to have a permanent home and I can kick on and play some football. It is good to get things done now, I can train and hopefully get some minutes under my belt. I have been training on my own for the last few weeks," Hamilton said.