Ferguson led Peterborough to two promotions before leaving the club in November 2009.
Ferguson was sacked by Preston a fortnight ago and has now replaced Gary Johnson, who was axed by Peterborough on Monday.
“I have a great relationship with the chairman and I am glad to be back,” said Ferguson. “We need to get some stability back to the football club. I can’t wait to get started.
“‘We are both young and ambitious, towards the end of my last tenure I got a bit carried away. I have learned a lot. We were naive when we went back into the Championship last time and we are determined not to make the same mistakes again.”
MacAnthony added: “Darren came to my house and we had a long chat. We have always had a lot of respect for each other.
“We are both ambitious, we have learned from the mistakes we have made and we are excited to get our project back on track.
“It is unfinished business. I want to work with Darren for a long time and that is why I have given him this contract.”