Cultural Leonesa draw Barcelona in Cup
Barca claimed their 25th cup crown in May, beating Athletic Bilbao 4-1 in the final, on their way to a treble of titles that included the league and Champions League.
"It's a very dangerous draw for us because already people are thinking there is no way we'll get knocked out," Barca's assistant coach Tito Vilanova told the club's website.
"We need to show a lot of respect with this tie, much more so than if we had drawn another team from the top flight."
Real Madrid were also pitched against a Segunda B side, city neighbours Alcorcon, and will be keen to avoid a repeat of their humbling exit to third-tier Real Union at the same stage last year.
"It's the rival we wanted and dreamed of getting," Alcorcon manager Jesus Alvarez told reporters.
"Everything is possible in football, and we have a small chance of beating Madrid."
There are four all-La Liga ties with the pick of them being the meeting between Getafe, losing finalists in 2007 and 2008, and the 2006 winners Espanyol.
Last year's losing finalists Bilbao, who have won the King's Cup 23 times, play second division Rayo Vallecano.
The two legs are scheduled to be played on October 28 and November 10.
The draw: (Division in brackets if not in La Liga)
Alcorcon (III) v Real Madrid
Cultural Leonesa (III) v Barcelona
Marbella (III) v Atletico Madrid
Atletico Ciudad (III) v Sevilla
Alcoyano (III) v Valencia
Puertollano (III) v Villarreal
Rayo Vallecano (II) v Athletic Bilbao
Hercules (II) v Almeria
Salamanca (II) v Racing Santander
Celta Vigo (II) v Tenerife
Recreativo Huelva (II) v Sporting Gijon
Real Murcia (II) v Deportivo Coruna
Xerez v Osasuna
Real Valladolid v Real Mallorca
Real Zaragoza v Malaga
Getafe v Espanyol