Having both won their last 16 ties this week, the Clasico giants have been drawn fellow La Liga sides in the final eight of the competition
Barcelona will hope to put their Anoeta troubles behind them when they meet Real Sociedad in the first leg of the Copa del Rey quarter-final.
The Spanish champions have not won in San Sebastian since 2007 and needed a Lionel Messi strike to earn a point in their league visit in November.
They will get a chance to end that winless run of eight matches on January 17, though, before the return leg at Camp Nou a week later.
Real Madrid begin their tie with Celta Vigo at the Santiago Bernabeu as Zinedine Zidane’s side’s hunt for the treble continues.
The leaders made it a record 40 games unbeaten as they battled back to earn a 3-3 draw in the second leg of the last round against Sevilla on Thursday – eclipsing Barcelona’s previous best of 39.
Real’s city rivals Atletico Madrid are also into the latter stages of this year’s competition after beating Las Palmas 4-3 on aggregate.
They will meet Eibar in the last eight, while second division Alcorcon will face Alaves.