Hayes, 27, moved to Deepdale in the summer but struggled to establish himself in the first-team under manager Darren Ferguson.
With just one goal in 10 appearances, he was loaned to Barnsley as part of the deal that saw Iain Hume move the opposite way.
He was not playing at Oakwell either, leading to suggestions he could return to North Lincolnshire for a third time. Ian Baraclough, the Iron manager, said that was unlikely due to the cost of his wages while he the sacking of Ferguson last week appears to have given him a second chance to establish himself at Preston.
"All I want to do is play at Preston and do well. I was disappointed when I had to leave, but that is the way football goes sometimes. I am back now, I am going to stay and hopefully do as well as I can with the team," he told Preston's official website.
"I was over the moon when I got the call from David Unsworth saying that he wants me back to get involved in the team. I want to show now that I am here to impress and want to do well for the team.
"I have been at Barnsley for the last two months but I haven't really been playing there. I wanted to get back, get back to playing again; I am just pleased to be back and to have played against Palace.
"I came here in the summer, signed a three year deal and brought my family over. I am very happy here, I just want to play for Preston and do well for the club."