The 21-year-old Magnussen replaces Mexican driver Sergio Perez, who announced Wednesday that he will leave McLaren after one season. Perez will drive for McLaren this weekend at the U.S. Grand Prix and the season's final race in Brazil.
Magnusson has come up through McLaren's junior driver program and won the Formula Renault 3.5 championship. He will be just the third rookie driver in the history of the team and the first since Lewis Hamilton in 2007.
McLaren has had a disappointing 2013, with no podium finishes heading into the final two races of the year.