The 25-year-old netted 12 times in the Premier League in 2018/19, his best return in five seasons at Newcastle since arriving from Tenerife.
Frequently linked with a move back to Spain, Perez's future had been called into question in recent months, with reports over the past week suggesting he has become unhappy with the Magpies' lack of ambition.
With the announcement of the deal, reported to be worth £30m, former Spain Under-21 international Perez becomes the Foxes' second signing of the summer following James Justin's arrival from Luton.
Speaking to LCFC TV, Pérez 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."
Perez offers Brendan Rodgers' side much-needed options in attack. While the Spaniard will likely be used in a supporting role to Jamie Vardy, he can also be used as a central striker, with current options Kelechi