Diarra, a France international, is overjoyed with the move and hopes to make a major impact on West Ham's 2012/13 season.
"I am very happy to be here at West Ham - everything is signed now which is good and I am excited to be here at this club and to be playing for them in the Premier League," he told the club's official website.
"I know a lot about West Ham as a club and when I knew they were interested in signing me, I was very happy and knew it would be a good choice for me.
"We are a Premier League club and I know of players who were here before like Paolo Di Canio and Scott Parker, but of the players now in the team, I know Guy [Demel], Mo [Diame] and of course, Modibo Maiga, who played in the French league last year.
"The club has just been promoted and I am looking forward to a good challenge with the team ahead.
"I see this as my chance in the Premier League to do well with West Ham. I hope that my experience can help and the fans will see me give my all in the matches."