West Ham's first game at their new Olympic Stadium home will be a pre-season friendly against Juventus on Sunday, 7 August.
The Hammers move into the 60,000-seater stadium, which was built for the London 2012 Olympics, this summer after 112 years at Upton Park.
Two-time European champions Juventus are one game away from winning their fifth consecutive Italian title.
It will be the first time the sides have played each other.
Hammers boss Slaven Bilic said: "It will be a privilege to face one of the biggest clubs in the world in our opening game at the new stadium. Like us, they are a club steeped in tradition, so it is fitting that together we will create history with this match.
"We hope this will be the first of many games against Europe's top sides at our new home as we begin the journey of turning West Ham United into a team capable of competing with the best teams from across the continent."