James, 22, was named the club's young player of the year after helping the Foxes secure promotion from the SkyBet Championship last season.
His new contract will keep him at the club until June 2018.
"I'm absolutely buzzing, I can't think of any other way to describe it," he said. "Heading into the Premier League, after the unbelievable season we've just had - to sign a four-year deal with this club is just fantastic.
"For any club to offer you a long-term contract is a big compliment and shows a lot of faith in your potential, but to be offered one by a club as ambitious as Leicester City is something else."
Manager Nigel Pearson was delighted to tie down James, who joined Leicester in 2012 after starting his career with Manchester United.
"Matty has contributed an enormous amount to the group during the last two seasons - both with his performances on the pitch and with what he brings to the group off it," he said.
"Nobody recognises his value to the squad more than his team-mates. We watched him for a long time before he joined us and we were always confident that, given the opportunity to play regularly, he could be a big asset for us.
"He's a great lad, he works hard at his game and he's only just about to turn 23, so he clearly has time to improve even further."