Modric joined Madrid from Tottenham in 2012 and has gone on to make 436 appearances for the Spanish giants, winning the Champions League five times and three La Liga titles.
“Very happy to announce that I will continue playing for the best club in the world,” Modric said in a statement.
“It has been 10 seasons fulfilling a dream, but I still have the same motivation and desire as the first day. We keep going. Hala Madrid.”
The Croatia midfielder, who turns 37 in September, played a key role in Carlo Ancelotti’s side last term as they won both the La Liga and Champions League titles.
Modric played 28 times in the league last season, registering eight assists and two goals.
He provided four assists in the Champions League, including a superb through-ball for Karim Benzema against Paris Saint-Germain in the last 16 and a sensational pass with the outside of his foot for Rodrygo against Chelsea in the quarter-finals.
“Real Madrid C. F. and Luka Modric have reached an agreement to extend the player’s contract until 30 June 2023,” the club said in a statement.
Modric, who won his 150th international cap in Croatia’s 1-1 draw with France on Monday, also signed a one-year deal 12 months ago.
“Modric is going to end his career with Real Madrid,” Real coach Ancelotti said in April.
“I don’t know when, but that’s everyone’s idea. There’s no problem for the club or the management to extend his contract, that’s clear.”
Modric has continued to regularly start in midfield alongside fellow club stalwarts Casemiro and Toni Kroos.
Eduardo Camavinga has impressed in his first season, often as a substitute, while Madrid have reportedly agreed a deal to sign his fellow French youngster Aurelien Tchouameni from Monaco.
But Modric was never expected to follow long-time teammates Isco, Gareth Bale and Marcelo out of the door at the Santiago Bernabeu.
“He is spectacular, there’s nothing else to say,” said Ancelotti in December. “With the ball, without the ball, his consistency, his personality – extraordinary.”