The shock defeat in the last-16 tie came at the end of a turbulent week in which Real president Ramon Calderon got himself into trouble for criticising the players and coach Fabio Capello came under fire for his selection policy.
Despite the defeat Capello said: "I think we played very well, but we just had no luck and that's football. I'm very happy."
Real looked to have the tie well under control when Robinho gave them the lead after five minutes when his deflected shot found its way into the net.
The visitors turned the tie on its head eight minutes before the break when Dani equalised by heading in at the far post.
Real pushed forward at every opportunity in the second half, but without the out-of-favour David Beckham, Ronaldo and Antonio Cassano they lacked the firepower up front.
Real have not won the Cup since 1993, but the knockout competition was seen by many as the club's best opportunity of breaking their four-year trophy drought.
Betis, who won the Cup in 2005, join Barcelona, Sevilla, Osasuna, Deportivo Coruna, Real Zaragoza, Getafe and second division Valladolid in the hat for Friday's draw.