The France international midfielder has signed a three-year deal with the Hammers after they agreed an undisclosed fee, thought to be in the region of £2m, with the Ligue 1 club.
Diarra has said that he is "very happy" with the move and has promised the Upton Park faithful that he will 'give his all' for the club.
"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.
"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."
Diarra has been capped 44 times by France and was part of Laurent Blanc's Euro 2012 squad this summer.