The 64-year-old takes over at the London Stadium after another disappointing season for the Hammers, who flirted with relegation for much of the campaign before ultimately finishing in 13th place under the temporary custody of David Moyes.
Pellegrini returns to the Premier League two years after he was let go by Manchester City, with whom he won the Premier League title and two League Cup trophies.
In a statement, West Ham co-chairman David Sullivan said of the appointment: "I am delighted to welcome Manuel Pellegrini to West Ham United. He is one of the world's most respected football coaches and we look forward to working with him. It was important that we appointed someone with knowledge and experience of the Premier League, who already has an understanding – not only of the teams and players we face – but of West Ham United and our ambitions.
"Manuel brings a reputation for attacking football and getting the best out of his players. We believe he will attract new talent to the London Stadium as well as improving the current squad.
"Above all, he is a winner, who knows what it takes to succeed at the highest level and is driven to continue that success. Manuel is the first West Ham United manager to have a Premier League title on his CV, and we believe that his experience, quality and proven record of taking teams forward quickly will ensure that he is successful here."
Reports have suggested in recent days that Pellegrini, who quit a lucrative job in the Chinese Super League to move to London, will be paid as much as £10m a year by West Ham - a figure that would make him the third highest-earning manager in the Premier League after Pep Guardiola and Jose Mourinho.