He spent six years as Liverpool manager, winning the Champions League in 2005. He also had an interim spell with Chelsea, guiding the Blues to Europa League success in 2013.
“I have the pleasure to confirm I have committed to a legendary English club, with the massive challenge of remaining part of the Premier League,” said Benitez, who has brought in coaches Fabio Pecchia, Francisco de Miguel Moreno and Antonio Gomez Perez.
“It will be a challenge not just for me and my staff but for the players, the club and the fans.
“All of us must push together in the same direction and with the same target in mind. This is the reason why I’m going to ask for your total support to successfully complete this task.”
The former Liverpool manager, whose family still live on the Wirral peninsula in the north west of England, added: “Personally, it means my return to the Premier League, closer to my home and my family. I can’t be happier.”
McClaren was sacked after just nine months in charge.
Under the former England manager’s guidance, Newcastle won just six of 28 Premier League games.
Coaches Paul Simpson, Alessandro Schoenmaker and Steve Black have all left the club.
Managing director Lee Charnley said: “In Rafa we have, without doubt, secured the services of one of Europe’s top managers.
“He has managed some of the most successful teams at the very highest level of the game and we are proud to now have him as our manager.
“Our sole focus now is to give our full support to Rafa, his coaching team and the players in order to secure our status in the Premier League.”
Former Magpies defender Steve Howey told BBC Radio 5 live: “Benitez could be a fans’ favourite straight away. He’s got a fantastic track record.
“Sunderland seem to have done it in the last couple of seasons, changing their manager and getting a positive result.
“It’s a big contrast for him. It’s not that long since he was manager of Real Madrid and if things don’t go well he could be playing on a horrible, windy, wet midweek game down at MK Dons.”