With Hammers striker Andy Carroll struggling with yet another injury, boss Sam Allardyce moved for Sakho, who has scored 43 goals to help Metz win back-to-back promotions in the last two seasons.
The 24-year-old agreed a four-year contract with the Premier League side and could feature in the squad for their opening game of the season against London rivals Tottenham at Upton Park on Saturday.
"This is a proud day to have signed for West Ham, I really love English football and I've dreamed of coming to play for one of the big English clubs. Today, West Ham have given me that opportunity and I didn't hesitate to grab it," Sakho told West Ham's website.
"I'm looking forward to playing. It's more than a month now that I've been training for this and right now I think I'd be ready to pull on the club colours.
"I've come here to continue as I was at Metz. I'm going to give it my all, going flat out on the pitch and I think the fans will appreciate that."
Last season, Sakho continued his rise to prominence by scoring 20 goals in 36 appearances as Metz marched to the Ligue 2 title.
The striker's outstanding form saw him handed a senior international debut by Senegal in a friendly meeting with Burkina Faso on 21 May 2014. Four days later, he netted his first goal for his country in a 3-1 win over Kosovo.