McLaren will end their partnership with Renault following the 2020 Formula One season, instead switching their engine supply to Mercedes-Benz.
The British outfit took up Renault power for the 2018 campaign after a frustrating spell with Honda and sit an impressive fourth in the constructors' championship this year.
However, McLaren's Renault contract is up at the end of next season and they have opted to instead return to Mercedes, who had been their supplier with considerable success from 1995 until 2014.
McLaren chief executive Zak Brown said: "This agreement is an important step in our long-term plan to return to success in Formula One.
"Mercedes is the benchmark, both as a team and a power unit, so it is natural we would seek to secure a relationship with the company for the next phase of our journey.
"This announcement reflects the confidence of our shareholders and is an important message to our investors, employees, partners and fans that we are committed to returning McLaren to the front of the field."
The new deal will run until at least the 2024 season.
Renault managing director Cyril Abiteboul added: "Since our partnership began, McLaren has gone from ninth to fourth position in the constructors' championship. We can therefore consider this a very successful relationship.
"However, while looking beyond the terms of the current contract, which concludes at the end of 2020, it was apparent that Renault and McLaren have different ambitions for the future.
"Each of the different elements of this decision have been carefully evaluated over the past few weeks.
"2021 will be a crucial season for all teams and it is important for us to have a precise and clear view of the strengths and ambitions of our competitors going forward.
"This decision is in line with Renault's vision to become a works' team, with a goal to return to the front."