Scunthorpe will receive no fee for Hayes, 26, as he is out-of-contract. He becomes Preston’s first signing of the summer after completing the paperwork on Monday morning.
“It's been the hardest decision of my career and it's a sad one for me too because I've had great times with Scunthorpe,” Hayes told the Iron’s official website.
"The fans have been absolutely brilliant to me. I don't think I'll ever play for another club where I have such a good relationship with the fans. My kids are born in Scunthorpe and my wife is from Scunthorpe and when I played in Barnsley I still lived here.
"It's just very sad that I'm leaving. I appreciate the way the fans have stood by and supported me though because it means a lot to me."
Darren Ferguson, the Preston manager, said his side had been up against several clubs to sign Hayes.
“The lad had other options, big clubs as well. Leeds and people like that were very interested,” he said.
“He made it clear when I spoke to him and told him where I wanted to go with the club that he wanted to come here. He never changed his mind, and that says all I need to know about him.