Los Blancos were ultimately left embarrassed after they conceded four goals without replay in a disastrous second half at the Santiago Bernabeu.
Robert Lewandowski netted a brace to continue his fine form, before Lamine Yamal and Raphinha grabbed a goal apiece to extend their lead over Real Madrid to six points.
The manner of the demoralising defeat has led to speculation over the future of Ancelotti in the Real Madrid dugout.
Real Madrid step up plans to replace Ancelotti
According to Sport, Real Madrid is already taking steps to replace Ancelotti despite the fact he clinched the league title, Champions League and the Spanish Super Cup in a successful 2023-24 campaign.
The Italian is under contract until the summer 2026, but there is growing doubt about whether he will see out his current deal.
The report claims that Real Madrid president Florentino Perez is making plans to replace Ancelotti at the end of the season.
The Real Madrid president has been left disappointed with Real Madrid's campaign, especially as they strengthened their squad with the arrival of Kylian Mbappe.
While Perez will not make any drastic decisions, he is seemingly keen to appoint Bayer Leverkusen boss Xabi Alonso as Ancelotti's successor ahead of next season.
Will Real Madrid be able to appoint Alonso?
Alonso has forged a reputation as one of Europe's best young managers after he led Bayer Leverkusen to a league and cup double last season.
The 42-year-old oversaw an unbeaten domestic campaign, while he also guided the German club to the Europa League final.
Earlier this year, Alonso confirmed he would remain at the BayArena for the 2024-25 season after being linked with Liverpool and Bayern Munich.
However, there is considerable doubt whether Alonso will remain with Leverkusen until the end of his contract in 2026, especially as it was recently reported that the Bundesliga champions had already resigned themselves to his departure.
Real Madrid are believed to be keen to take advantage of a release clause in his contract which will allow him to leave for another club in June.
However, Los Blancos could face competition from Manchester City, who view Alonso as a potential managerial target if Pep Guardiola decides to leave when his contract expires next summer.