Fonte has agreed a deal until June 2019 with an option for another season at the London Stadium after seven years at Southampton, whom he helped to back-to-back promotions from Sky Bet League One to the Premier League.
The 33-year-old, who is Slaven Bilic's first signing of the January transfer window, has made 154 career appearances in the top flight, scoring seven goals.
"I told the manager in conversations that we want to win and we want to win trophies," Fonte told whufc.com. "The ambition is big and we need to aim high."
Fonte will not play in Saturday’s trip to Middlesbrough but could make his West Ham debut at home to Manchester City on 1 February.