The decision was made on Wednesday morning, sources said, after Zidane had asked the club for a few days to consider his future.
In recent months, Zidane had refused to commit to remaining in the job next season, leading to widespread speculation that he was planning to leave.
“You might think I walk away from responsibility or leave when things get complicated, but no, never,” Zidane said on May 15 when pushed on his future.
Financial restrictions saw the club decide not to spend on new signings last summer, and the start to this campaign proved more difficult both domestically and in Europe.
In La Liga, Madrid suffered an embarrassing 1-0 loss to newly promoted Cadiz in October, and were beaten 4-1 by Valencia and 2-1 at home to Alaves in November.
In January, the former France international’s job was at risk after being knocked out of the Spanish Supercopa and Copa del Rey, while a La Liga defeat to Levante left them 10 points behind leaders Atletico. But a new-year surge saw the team recover to go 18 league games unbeaten.
Zidane had never previously gone a full season in charge without landing any silverware, but Atletico’s last-day La Liga triumph on Saturday meant he ended the 2020-21 campaign empty-handed.
Zidane, 48, returned to the Real Madrid job in 2019, having previously been in charge from 2016 to 2018.
Before that, he spent five years at the club as a player, worked as an assistant to Carlo Ancelotti, and coached B-team Castilla before being offered the first-team job in January 2016.
He won an unprecedented three consecutive Champions League trophies in 2016, 2017 and 2018, as well as the club’s first La Liga title in five years in 2017.