The Hammers agreed a deal with the multiple Seria A champions, reportedly worth £10m.
Ogbonna, who joined Juve from city rivals Torino in 2013, made 31 appearances for the club last season and was an unused substitute in the Champions League final.
The 27-year-old becomes West Ham’s fifth signing of the summer.
Pedro Obiang, Dmitri Payet, Darren Randolph and Stephen Hendrie are the other players to have joined new manager Slaven Bilic’s squad.
Ogbonna has won 10 caps for Italy and was a member of the Euro 2012 squad, although he did not play.
Born to Nigerian parents who migrated to Italy in 1983, settling in the city of Cassino in the central part of the country, Ogbonna managed to obtain Italian citizenship only after his 18th birthday.