The newly-promoted Hammers have agreed a three-year deal with the 25-year-old Senegalese international.
West Ham indicated in a statement that they had fought off considerable interest from Premier League rivals and abroad to bring the midfielder to Upton Park.
"I'm very happy and very excited to have joined the club and I'm looking forward to the start of the season," said Diame.
"I know the fans here get behind the team all the time and I'm looking forward to showing everybody what I can do on the pitch."
West Ham manager Sam Allardyce added: "His potential is really good and he's ready to go and compete in the first team straight away as he's had three years in the Premier League already.
"He's 25 and can only get better and I hope he can go on to prove that to me and all of the West Ham United fans. He will be a very exciting addition to the squad."
Diame becomes the third arrival at West Ham this summer after goalkeeper Jussi Jaaskelainen and Stephen Henderson.