A £20m release clause in Vardy's previous contract had been activated by Arsenal, leaving the England striker with a decision to make over his future.
Following a fortnight of negotiations between Vardy's representatives and Leicester while he was in France for Euro 2016, the 29-year-old accepted Leicester's offer of a contract extension on improved terms.
Read more: How Brexit would impact Premier League clubs
In a statement Leicester said: "Both parties hope that this announcement will end recent speculation regarding Jamie’s future and confirm his long term commitment to Leicester City Football Club.
"Jamie will continue to focus all of his efforts on trying to achieve success with the England team at the European Championships in France."
Vardy's 24 goals were crucial in firing Leicester to an historic Premier League title last season and earned the former non-league player a place in Roy Hodgson's 23-man squad for Euro 2016.
Arsenal's approach indicated a change of policy for manager Arsene Wenger, who is renowned for being averse to signing players over the age of 28 for large fees and waiting until later in the transfer window before conducting business.
Yet the Gunners had only tabled a three-year contract offer for Vardy who is believed to have wanted more long-term assurances from the club.