Ferguson, who has led the side to three promotions, will be joined by youth team coach Gavin Strachan as part of the management team restructure after Kevin Russell left by mutual consent.
Ferguson said: "After lengthy talks between the chairman and I regarding the future and where we both wanted to take the club, and him showing me such support again gave me great belief of where the future lay.
"I explained my vision of how we continue to be a success both in the development of our players and also on the pitch. I am delighted to have signed the three-year deal.
"I am very excited at the prospect of being at the new training ground on a permanent basis where we will get the opportunity to do this.
'It is a blow to lose Kevin as he has been with me during all my time as a manager and without him our success would never have been possible and I cannot thank him enough, but we both felt the timing was correct. I am looking forward to working closer with Gavin."
Chief executive Bob Symns said: "Kevin has been a magnificent servant of the club in his time with us and has been instrumental in its success.
"We wish him and his family well for the future and I'm sure we'll see him here again at the Posh."
Russell said: "After seven challenging yet rewarding years at Peterborough United Football Club, the time has come for me to move on.
"I would like to thank the chairman, the players, the staff and supporters. In particular I would like to thank Darren and wish the club all the success in the future."