"I'm very happy to be here at such a historic club".
The midfielder previously had a stint at Aston Villa and made 48 Premier League appearances for the club before they were relegated to the Championship in 2016.
It has been a really busy summer in east London and the 29-year-old Perez becomes West Ham's eighth new signing, as manager Manuel Pellegrini overhauls his squad.
West Ham have confirmed the signing of Colombia worldwide midfielder Carlos Sanchez from Fiorentina.
Sanchez's future appears to be away from Fiorentina after spending last season on loan at La Liga side Espanyol.
West Brom have emerged as surprise contenders in the race to sign Fiorentina midfielder Carlos Sanchez, with West Ham also keen. "I'd like to thank all of the people, the whole club, for having me".
Arsenal is reducing on the number of players in its record books to cut on their wage budget which is now high since the gunners do have players like Mesut Ozil who are getting paid huge sums of money so Lucas Perez joins that list of players who get axed from the club.
West Ham director of football Mario Husillos moved for Sanchez following a ringing endorsement from the Colombian manager Jose Pekerman under whom he has reached nearly 100 worldwide caps.