Defender George Williams will re-join MK Dons on a two-year deal on 1 July when his contract with Barnsley ends.
The 22-year-old, who can play in both full-back positions, started his career as an apprentice at MK Dons, but was released by the club four years ago.
Barnsley signed him from Worcester City in 2014 and last season he played in 23 games, including the League One play-off and Football League Trophy finals.
But an initial offer of a new deal was withdrawn by the Yorkshire club.
He said: “It feels really good to be back. This is my hometown club – I’m over the moon to get this deal done.
“Me and the gaffer had a really good chat, but he didn’t really have to sell it to me. I know the club well from my time here as a youngster and ever since I left I’ve always checked up on how the Dons are doing.”