Los Blancos entered the second leg of the last-16 tie with a 3-0 advantage, but it proved to be a tricky second match against the Segunda Division club as Guillermo Fernandez came off the bench to net twice.
Real Madrid boss Zinedine Zidane made 10 changes from the team that started against Celta Vigo in the league at the weekend. Only Nacho kept his spot, with the likes of Jesus Vallejo, Theo Hernandez, Marcos Llorente, Dani Ceballos and Borja Mayoral coming in.
Mayoral tried his luck from distance in the 24th minute as Real Madrid looked for a second, but his effort was wide, and that was the story of what was a largely uneventful first half-hour of action in Madrid.
Numancia lost Higinio to a hamstring problem late in the first period, but the visitors incredibly levelled the scores in the 45th minute when Guillermo converted a low Mateu cross having only come off the bench four minutes before.
Ceballos and Mayoral both had half-chances for Real Madrid in the first six minutes of the second period, but neither could find the back of the net as Numancia continued to hold their own in the capital.
Nacho fired just over the away side's goal in the 56th minute as the pressure continued, and Los Blancos scored their second just before the hour when Vazquez hooked a Mayoral header home from close range.
Guillermo had a super chance to level for Numancia in the 73rd minute after breaking into the Real Madrid box, but the number 23 could not find a route past Kiko Casilla.
Guillermo was not to be denied, however, and netted his second of the match in the 82nd minute when he headed a Saul Garcia cross into the far corner of the net.
REAL MADRID (4-3-3): Casilla; Carvajal (Achraf 46'), Vallejo, Nacho, Theo; Llorente, Ceballos, Kovacic; Lucas, Mayoral (Casemiro 77'), Asensio (Isco 63')
NUMANCIA (4-2-3-1): Munir; Medina (Etxeberria 72'), Elgezabal, Calvo, Saul; Grego, Larrea; Nacho, Dani Nieto, Mateu (Milla 66'); Higinio (Guillermo 41')