The 29-year-old has signed a three-year contract at the London Stadium, where he reunited with former Arsenal teammate Jack Wilshere.
Perez joins Ryan Fredericks, Lukasz Fabianski, Issa Diop, Jack Wilshere, Aindriy Yarmolenko, Fabian Balbuena and Felipe Anderson in moving to the Hammers this summer.
“I’m very happy to be here at such an historic club,” he told the club’s official website. “I’m very excited, as West Ham are giving me the chance to stay in the Premier League and I’m very happy to be part of this new project.
“West Ham have great fans and play in an amazing stadium, so to sign here brings me great joy. I’m very motivated.”
Perez was signed from Deportivo La Coruna for £17m in the summer of 2016 but failed to establish himself as a regular in the team.
He went back to Deportivo on loan last season and was surplus to requirements at the Emirates after the arrivals of Alexandre Lacazette and Pierre-Emerick Aubameyang.
Perez scored seven goals in 21 appearances for the Gunners, with agent Rodrigo Fernandez Lovelle telling ESPN FC on Monday that he wanted to stay in London and prove himself in the Premier League.