Real Madrid had to rely on a triple substitution to pick up three points in Galicia on Saturday night.
Riki gave Deportivo la Coruna a first half lead at the Riazor, and Madrid were lucky to only trail 1-0 at half time.
On the hour, Mourinho introduced Mesut Ozil, Cristiano Ronaldo and Sami Khedira and the pendulum swung in Madrid's direction.
First Kaka equalized and then, with time running out, Gonzalo Higuain scored a late winner to break Depor hearts and leave them adrift at the bottom of the table.
La Liga: Estadio Riazor, A Coruna (2 p.m. ET)
Deportivo la Coruna 1-2 Real Madrid (Riki - Kaka, Higuain)
Deportivo la Coruna: : Aranzubia; Sílvio (Bergantinos), Marchena, Kaká (Jesus Vazquez), Ayoze; Abel Aguilar, Assunção; Bruno Gama, Valerón, Pizzi; Riki (Nelson Oliveira)
Real Madrid: Diego López; Arbeloa, Pepe, Carvalho, Marcelo (Ronaldo); Essien (Khedira), Modric (Ozil); Kaka, Callejón, Di María; Higuain