Madrid started the season well under Lopetegui, but things began to unravel with their 3-0 defeat away to Sevilla on September 26, and that result was followed by a draw with Atletico Madrid and further losses to CSKA Moscow, Deportivo Alaves and Levante.
The 52-year-old earned a stay of execution with a Champions League win over Viktoria Plzen last Tuesday, but a 5-1 loss to LaLiga's defending champions has led to Madrid relieving him of his duties.
Chelsea and Juventus boss Antonio Conte had been heavily tipped to be appointed as his replacement, but Real Madrid Castilla boss Santi Solari will take up an interim role as the Santiago Bernabeu board plot their next move.
"This decision aims to change the dynamics of the first team when all the objectives of this season are still achievable," read a club statement.
"The board of directors understands there is a great disproportion between the quality of the squad, which has eight players nominated for the Ballon d'Or, and the results obtained so far."
Lopetegui was appointed in controversial circumstances, accepting the job while still coaching Spain ahead of the World Cup.
That resulted in his dismissal by Spain just two days before their opening match in Russia, allowing him to take office at Madrid as Zinedine Zidane's successor at the start of July.
But Lopetegui suffered the blow of losing Cristiano Ronaldo to Juventus at the beginning of his reign and the Portugal star was not suitably replaced.
Madrid had numerous injury problems in recent weeks but poor results against inferior opposition led to speculation the coach would not stay on, even with a win over Barca.
Photo Getty Images. Caption: Real Madrid coach Julen Lopetegui