Areola also spent last season in the Premier League, where he was on loan at Fulham but could not prevent the Cottagers from dropping down to the Championship.
The 28-year-old Frenchman played 36 times in the top flight last season, and was named Fulham’s player of the season.
He has been signed by David Moyes to provide competition for 36-year-old Lukasz Fabianski.
"For me it was the best opportunity to sign for this club, to sign for West Ham and to try my best to help the team," Areola told the club's website.
"London is a great place to live and to work as well, and obviously the Premier League is one of the best leagues in the world so I really enjoyed it last season. It was tough for me and for the team, but I enjoyed playing in the Premier League. We were without the fans, but this year we will have the fans back so I can't wait to see the atmosphere.
"West Ham did a big season last year. Obviously we have the Europa League and the Premier League and the two cups, so it will be a tough season and a long season but I think we're going to enjoy it all together.
"We have really good squad. I watched games last season so I know the potential and the talent in this squad, so I can't wait to start."
Areola has also had loan spells at Villarreal and Real Madrid, and was one of France’s reserve goalkeepers when they won the FIFA World Cup in 2018.
Hammers boss Moyes added: "Alphonse is an experienced and talented goalkeeper who has played at the highest level and performed very well in the Premier League last season.
"As we prepare for a very busy schedule, he will provide fantastic competition for the goalkeepers already at the football club and we are going to need to use our squad to ensure we compete to the best of our abilities across all competitions.
"We have been aware of his qualities for a long time and we have no doubt he will be another player and character who will enhance our squad. We welcome Alphonse to West Ham United and look forward to working with him."