Fernando Alonso's move to Aston Martin to replace Sebastian Vettel saw Alpine announce that the highly-rated Piastri, 21, would be promoted from his role as reserve driver.
But Piastri later said he would not be driving for Alpine after, and unbeknown to the French team, he had signed a deal with McLaren to take the ousted Daniel Ricciardo's seat.
Formula One's Driver Contract Recognition Board - which consists of four lawyers - met on Monday to determine Piastri's fate, with their outcome published moments before second practice at the Dutch Grand Prix in Zandvoort.
The CRB revealed Piastri signed his deal with McLaren on July 4, the day after the British Grand Prix and more than seven weeks before Ricciardo's departure from McLaren was revealed.
Ricciardo, who is now scrambling to save his Formula One career, crossed the line 13th of the 14 finishers at Silverstone.
A statement from F1's governing the FIA read: "A Tribunal appointed by the Contract Recognition Board held a meeting on 29 August 2022 when counsel for Alpine Racing Limited, McLaren Racing Limited and Mr Oscar Piastri were heard.
"The Tribunal has issued a Unanimous Decision that the only Contract to be recognised by the Board is the Contract between McLaren Racing Limited and Mr Piastri dated 4 July 2022. Mr Piastri is entitled to drive for McLaren Racing Limited for the 2023 and 2024 seasons."
The development will come as a major blow to Alpine. The French team said it would not contest the CRB's decision and added they "consider the matter closed".
Piastri has impressive pedigree in the junior ranks, winning both the Formula Two and Formula Three championships. He will partner British driver Lando Norris at McLaren after agreeing terms on a two-year deal.
"I'm extremely excited to be making my F1 debut with such a prestigious team as McLaren and I'm very grateful for the opportunity that's been offered to me," he said.
"The team has a long tradition of giving young talent a chance and I'm looking forward to working hard alongside Lando to push the team towards the front of the grid. I'm focused on preparing for my F1 debut in 2023 and starting my F1 career in papaya."
McLaren CEO Zak Brown added: "Oscar is one of the up-and-coming talents coming through the feeder series into F1 and we are delighted to see him join the team for 2023.
"Winning both F3 and F2 in successive rookie seasons is a real achievement and testament to his talent in single-seater racing.
"In Lando and Oscar we have a young, exciting F1 line-up with a huge amount of potential, standing us in good stead to achieve our future ambitions.
"Oscar is an exciting addition to the McLaren family and we look forward to seeing him grow with our F1 team."