The Hammers are 14th in the Premier League, seven points above the relegation zone, after six wins in 20 league matches during former Spain and Real Madrid coach Lopetegui's ill-fated tenure.
A 4-1 hammering at champions Manchester City was the final straw for the London club. "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." Potter began his managerial career at Swedish club Ostersund and had successful spells with Swansea and Brighton before taking over at Stamford Bridge.
His first match is against Aston Villa in the FA Cup third round prior to Premier League matches against Fulham and Crystal Palace.