Real finished runners-up to city rivals Atletico in LaLiga.
Real were unsuccessful in defending their LaLiga crown this season, finishing runners-up to city rival Atletico, and Zidane has opted to end his second spell in charge.
A club statement read: “Real Madrid CF announces that Zinedine Zidane has decided to end his current stage as coach of our club.
“It is now time to respect his decision and show him our appreciation for his professionalism, dedication and passion in all these years, and for what his figure represents for Real Madrid.
“Zidane is one of the great icons of Real Madrid and his legend goes beyond what he has been as a coach and player of our club.
“He knows that he is at the heart of Real Madrid and that Real Madrid is and will always be his home.”
Real have failed to win a trophy for the first time in 11 years this season and there had been speculation over Zidane’s future.
The 48-year-old Frenchman has won the LaLiga title twice with the club and won the Champions League for three successive seasons since he first took charge in 2015.
Zidane spent five years as a player with Real until he retired after winning the 2006 World Cup with France.
He returned to the Bernabeu as manager of their B team, Real Madrid Castilla, in 2014 and was announced as Rafael Benitez’s replacement as the club’s senior head coach in January 2016.
The former midfielder left the club in May 2018 after leading them to their third Champions League title, but returned 10 months later to replace Santiago Solari.
Real reclaimed the domestic crown from Barcelona in 2020, but this season were knocked out at the semi-final stage of the Champions League and did not get beyond the last 32 in the Copa Del Rey.