Potter, who has signed a two-and-a-half-year deal with the Premier League club, will be in charge for West Ham's FA Cup trip to Aston Villa on Friday night.
The 49-year-old had previously been linked to the England role that ultimately went to Thomas Tuchel, but will now head to East London to take up his first job since being dismissed by Chelsea in April 2023.
Potter started his managerial career at Ostersund in Sweden and thereafter moved to Swansea before an impressive spell at Brighton led to him being lured to Stamford Bridge.
The announcement of his new role was made a day after West Ham confirmed Lopetegui's departure on Wednesday afternoon, with the Spaniard only able to see out seven months of the two-year deal he signed in May to replace David Moyes.
The west London club is currently 14th in the Premier League standings, level on points with Manchester United in 13th, after six wins from 20 games.
“I am delighted to be here," said Potter. "It was important to me that I waited until a job came along that I felt was right for me, and equally that I was the right fit for the Club I am joining. That is the feeling I have with West Ham United.
“My conversations with the Chairman and the Board have been very positive and constructive, we share the same values of hard work and high energy to create the solid foundations that can produce success, and we are on the same wavelength in terms of what is needed in the short-term and then how we want to move the Club forward in the medium to long term.
“West Ham United is a huge Club, at the heart of London, with a tremendous fanbase and great support all around the world. I saw the scenes that followed their Europa Conference League victory in 2023 and it was clear that this is a Club with everything in place to become consistently successful, both on and off the pitch.
“The Club have made a lot of good progress in recent years and ensured there are some very strong foundations in place to build on. You don’t win a European trophy by fluke – there has to be a good bedrock at a football club for that to happen, and the challenge now is to take that on and build the next steps, to develop a team and a Club that the supporters can be proud of.”