It is City's second signing of the off-season, after left back Angelino from PSV Eindhoven on Wednesday, as it looks to construct a squad to win the Premier League for a third straight year.
Losing Perez is a further blow to the Magpies after former boss Rafael Benitez left the club following the end of his contract on Sunday.
The 25-year-old, who joined the Magpies from Tenerife in 2014, scored 13 goals in all competitions for the Magpies in 2018-19, taking his tally for the club to 48 in 195 appearances.
It went on to say the player wanted to be at a club that could compete with the likes of Wolves and Everton, something he could not see happening at St James' Park.
Speaking to LCFC TV, he said: 'I'm very happy and very pleased. "I'm very proud to be part of the Leicester family and I can't wait to get started", said Perez.
The Spanish striker is excited at the prospect of linking up with Brendan Rodgers and playing attacking football.
It is claimed an official approach has not yet been made regarding Martinez, however, feelers have been put out and it could only be a matter of time before Newcastle request permission.
"I think he's a player who will excite our supporters, and his style is one that I believe complements the options and quality that we already have here at the club".