Magnussen's F1 career appeared to be over at that point, and he has raced in IndyCar, IMSA and the World Endurance Championship since, but Haas' decision to cut ties with Mazepin and title sponsor Uralkali opened up an unlikely opportunity for the Danish driver.
The signing, which is a multiyear deal, was confirmed on the eve of the second preseason test ahead of the new F1 season.
Sources told ESPN that Magnussen emerged as the lead candidate this week and that talks between the two parties accelerated over the past 48 hours.
Despite Magnussen's famous clashes with Haas team boss Guenther Steiner, which were showcased on the Netflix series "Formula 1: Drive to Survive," he left on very good terms with the team.
In his previous stint in F1, Magnussen was a popular driver, considered a hard racer who never had the car to truly showcase his ability.
Ferrari reserve driver Antonio Giovinazzi was tipped as a candidate, but it is understood he was never seriously considered for the role.
"I was obviously very surprised but equally very excited to receive the call from Haas F1 Team," Magnussen said in a statement. "I was looking in a different direction regarding my commitments for 2022 but the opportunity to return to compete in Formula 1, and with a team I know extremely well, was simply too appealing."
Magnussen's arrival is a huge boost to Haas after a difficult start to 2022, which has included the Mazepin/Uralkali ouster, a first preseason test hampered by car troubles and this week's freight delay that will see it miss at least the opening morning of this week's preseason test in Bahrain.
Magnussen will partner F1 sophomore Schumacher, the son of seven-time world champion Michael.
Schumacher outperformed Mazepin comfortably and regularly in 2021, and Magnussen will provide a much better measuring stick for the German youngster.
Schumacher, who shares the Ferrari F1 reserve driver role with Giovinazzi, has arguably the most famous surname in racing and one that is synonymous with the Italian team thanks to his father's success there in the late 1990s and early 2000s.
As a result, he has long been tipped for an elevation up the ranks. How Schumacher fares against Magnussen will likely be one of the year's most compelling storylines.
"I'm delighted to welcome Kevin Magnussen back to Haas F1 Team," Steiner said in a statement.
"When looking for a driver who could bring value to the team, not to mention a wealth of Formula 1 experience, Kevin was a straightforward decision for us. Kevin's immediate availability means we can tap into him as a resource for preseason testing alongside both Mick Schumacher and Pietro Fittipaldi.
Magnussen has long been considered one of the sport's unrealised talents, having never had a truly competitive car.
He finished second on his Formula One debut with McLaren at the 2014 Australian Grand Prix, but his arrival at the team coincided with its fall from the top of the competitive order and he never finished on the podium again in the 118 starts that followed.
A stint at Renault followed before his switch to Haas. Magnussen played a key role in Haas' fifth-place finish in 2018.