Diame will finalise his move to Upton Park on July 1 after the expiry of his Wigan contract.
"I'm very happy and very excited to have joined the club and I'm looking forward to the start of the season," Diame told the club's website.
"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."
Diame will meet his new team-mates on the first day of pre-season training on July 1 before flying out with the team to Austria.
He is the third new signing of the summer for the newly-promoted Hammers, joining Stephen Henderson and Jussi Jaaskelainen in Sam Allardyce's squad.
Allardyce said: "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 joined Wigan in 2009 from Spanish club Rayo Vallecano, having previously played for Lens and Linares.
The adidas Nitrocharge is the most talked about new cleat in years. It was released on May 15 and will take your pitch by storm.
Chelsea won the Europa League on Wednesday. The Blues defeated Benfica 2-1 on injury time goal from Ivanovic.
The Liverpool 2013/14 soccer jersey is available for pre-order. The Reds are eager to compete for silver next season.
The push for more color on their cleats, adidas has added the infrared colorway to the adiZero f50 Line.
adidas has added some color to the Predator line with this new colorway. Released on May 17. Be the first to own a pair.
The Juventus jersey for the 2013/14 was released earlier this week. Be the first to wear the colors of the Old Lady.
Ajax has released their away soccer jersey for the 2013/14 season. Get in the Gear.
One of the top soccer cleats for control the Nike CTR360 will not let you down on the field in tight spaces.
The new PUMA evoSPEED 1.2 FG. A great new soccer cleat with classic look and first time for PUMA to be on the cleat.
Borussia Dortmund hears Wembley Calling and are headed to London for the Champions League final.