Middleton, 24, made 20 appearances for the Holy Blues last season, having joined the club from Alfreton Town.
He was one of three regular starters from last season who were given summer targets by the management team of Liam King and Ross Hannah.
King said: “Ross and I gave Harry some targets over the summer and he has gone away and worked incredibly hard.
“He has come back in fantastic shape and integrated into the side brilliantly, so obviously we are delighted to secure his services for the season.
“This is just the beginning for Harry though, he’s set the bar high and it’s now up to all of us to keep improving and developing.”
Middleton made more than 60 appearances in the Football League for Doncaster, before short spells at Port Vale and Halifax.
He said: “I’m delighted to get it sorted. I’ve worked hard (in the) off season and hopefully this year I can show everyone what I can do.
“We’ve got a great squad this year and I’m looking forward to doing my bit in what I believe will be a successful season.”
Keep up-to-date with our exclusive email newsletters.
Subscribe