Jenson Button will not race in Formula 1 in 2017 but will remain with McLaren as an ambassador.
The 2009 world champion will work with the team and could race again in 2018, having signed a two-year contract.
Belgian Stoffel Vandoorne will be promoted from reserve driver to partner double world champion Fernando Alonso.
Button said that after racing in F1 since 2000 he had come to the conclusion over the summer break in August that he wanted to take a break.
He and McLaren chairman Ron Dennis devised what the 69-year-old described as an "innovative" solution to the problem to keep all their options open for the future.
Dennis said the offer "reflected the esteem" in which McLaren held Button, who has driven for the team since 2010.
Button said it was a "dream to have that rest and have the opportunity to race in 2018".
Button will be McLaren's reserve driver, and will race if either Alonso or Vandoorne are unable to for any reason.
The 36-year-old will do work in McLaren's simulator, attend a number of races to work with the team, maintain an F1 level of fitness and "remain current", as he put it.
"There are many things I want to do that I haven't been able to do because of the F1 schedule," Button said. "When you drive in F1, it is your life, and I definitely need a break from that in 2017.
"In 2018 the team have an option on me to race for McLaren-Honda, which is pretty awesome.
"It is a long way in the future but this has been a very interesting week for me with Ron.
"This is something that really works for me, and I am so, so happy we have come to this agreement and I will do everything I can to make sure this team is as good as it possibly can be."
Dennis said: "To avoid any confusion, forget the word 'retirement'. Jenson is one of the team's drivers for the next two years. It is a very practical and logical solution that Jenson get his mind balanced and re-established and relaxed and then look at the future."
He added that Button had turned down offers from other teams in favour of staying with McLaren in his new role.
The McLaren chairman denied the move was an insurance policy in the circumstances - Alonso's contract expires at the end of 2017 and he has made it clear he will not decide on his future until he has driven next year's cars.
And it is unclear how the highly rated Vandoorne will fare in his debut season against one of the sport's all-time greatest drivers.
Vandoorne said: "I am always up for a challenge and I am very positive about it. In F1, you have to go up against the best and I'm looking forward to the challenge."
Button said: "Stoffel has definitely stood out as a driver coming through the junior categories and he has been so well educated learning from two world champions.
"He is in a good position to do well, but apart from that it's complete guesswork."
Alonso paid tribute to Button as "the best team-mate I ever had in terms of performance - feedback, with engineers and car development was great with him".
Button, who has been linked to setting up a team in World Rallycross, where his late father John raced in the 1970s, said there was a "possibility" of racing in another category next year but "at the moment I'm not thinking about anything apart from the rest of this year."
"I don't really know where it is going to take us in the future but it is exciting and a great opportunity."
World champion Lewis Hamilton said: "Jenson has been an extraordinary British champion. He has done 17 years. It is a long, long stint.
"I wish him all the best. He is still young, healthy and fit. What he has achieved is fantastic."