Potter has paid the price for West Ham slumping to next-to-last place after losing four of their league games so far and being knocked out of the League Cup too.
Nuno left Nottingham Forest on September 9 after a deterioration in his working relationship with the club's hierarchy and was replaced by Australian Ange Postecoglou.
But he has now secured a rapid return for his fourth stint in England's top division, having previously coached Wolves and Tottenham.
"My objective is to work hard to get the very best from the team and ensure that we are as competitive as we possibly can be," Nuno said. "The work has already started and I am looking forward to the challenge that is ahead."
Potter took charge in January and led the club to a 14th-placed finish last season.
"Results and performances over the course of the second half of last season and the start of the 2025-26 season have not matched expectations," West Ham said.
"The board of directors believe that a change is necessary in order to help improve the team's position in the Premier League as soon as possible."
Potter said he was "incredibly disappointed" to be leaving West Ham "without being able to achieve what we set out to achieve."
"I do however fully acknowledge that the results have just not been good enough up to now," Potter said in a statement via the League Managers Association.
West Ham turned to Potter at the start of 2025 after Julen Lopetegui — the successor of long-serving boss David Moyes — lasted only 22 matches.
Potter had turned down multiple job proposals during a nearly two-year spell out of management following his dismissal by Chelsea, where he lasted seven months in the 2022-23 season.
Before that, he built a strong reputation with stints at Ostersund in Sweden, Swansea and Brighton.
West Ham finished last season with only two wins from their final 11 league matches and lost key attacker Mohammed Kudus in the offseason.
"I'd like to thank all the staff at the club who made me feel so welcome, the playing squad and their continued efforts during my time," Potter said, "and lastly the fans, who have been so supportive during what has been a difficult journey at times."