On a night when their arch-rivals Barcelona were also knocked out of the cup competition by Athletic Bilbao, Real were bested at the Santiago Bernabeu despite a late rally from the hosts.
Norwegian Martin Odegaard scored against his parent club to help get Sociedad off to the perfect start before a quickfire brace from Alexander Isak gave the visitors a surprise 3-0 lead in the capital.
Marcelo did pull one back before Sociedad restored their three-goal advantage through Mikel Merino.
In the final 10 minutes, it was one way traffic and, despite a late sending off for Andoni Gorosabel and goals from Rodrygo and Nacho, Real could not get themselves back on level terms.
Zidane, who faces an uncertain future at the Santiago Bernabeu despite his team sitting top of La Liga currently, was not afraid to hide his disappointment after his side's cup exit but tried to take some positives from the match, as his side battled right until the final whistle to try and salvage a result.
"It hurts, we have to be honest, nobody likes a defeat," said Zidane. "Despite [trailing] 1-4, we have fought until the end, but it has not been possible.
"We must congratulate the opponent and also accept losing."
Real will have to dust themselves down quickly as they return to La Liga action on Sunday with a trip to Osasuna, a game in which a win would see them move nine points clear at the top of the table ahead of rivals Barcelona travelling to Real Betis later that evening.