The 25-year-old returns to the Premier League having made seven appearances in the competition during a three-year stint at Arsenal.
Mavropanos failed to become a first-team regular at the Emirates Stadium and spent two seasons on loan in the Bundesliga with Stuttgart before making the move permanent last summer.
He has signed a five-year deal with the Hammers for an undisclosed fee, reported to be in the region of £19million.
“I am really happy and excited to be here – and to be back in the Premier League with West Ham United,” he told the club’s official website.
“It’s an exciting time to be joining the club after last season’s Conference League win – and I am really looking forward to the next step in my career. I can promise the fans I will give everything for them and the shirt.”
He was signed after a move for Manchester United and England centre-back Harry Maguire broke down and is the third major summer arrival at the London Stadium following the additions of Edson Alvarez and James Ward-Prowse.
There had been suggestions last week that Mavropanos’ move had broken down after an issue with his medical but he has now made the switch. He could be in contention for West Ham’s next match against Brighton on Saturday.