Carvajal has made 450 appearances for Los Blancos, scoring 14 goals and registering 65 assists in a spell which saw him lift every trophy possible with the Spanish giants.
The 34-year-old has won 27 major trophies with the club during a 13 year stint that established him as one of the most successful players in club history.
Madrid have now announced he will leave the side, in what is an emotional farewell.
“Real Madrid C.F. and our captain Dani Carvajal have agreed to bring an end to a wonderful chapter as a player of our club at the conclusion of the current season.
“Real Madrid wishes to express its gratitude and affection to one of the greatest legends of our club and world football.
“Real Madrid wishes Dani Carvajal and his family all the best in this new chapter of his life.
“The Santiago Bernabéu stadium will pay tribute to him this Saturday during the final La Liga match our team will play.”
Club president Florentino Pérez also sent a message to the defender who leaves on the best of terms.
“Dani Carvajal is a legend and a symbol of Real Madrid and its academy. His image alongside our beloved and remembered Alfredo Di Stéfano laying the first stone of Ciudad Real Madrid will forever remain in the hearts of all madridistas and in the history of our club. Carvajal has always exemplified the values of Real Madrid. This is and will always be his home.”
Carvajal will not be heading to the 2026 World Cup with Spain, meaning he can immediately focus on his future ahead of an emotional farewell this weekend.
