King's Cup holders Real started stronger with Mesut Özil
putting the hosts in front after only 13 minutes and stoking a vibrant atmosphere at the Bernabeu.
Barca struggled to settle into their game before, out of nothing,David Villa levelled with a stunning shot in the 35th, and Lionel Messi rubbed salt in the wound as he scampered through to make it 2-1 just before the break.
Real stormed back in the second half Xabi Alonso equalising early on, but despite creating the better chances Barca hold the edge going into Wednesday's second leg at the Nou Camp.
Barca gave new signing Alexis Sanchez his debut in an unfamiliar line up that also included 20-year-old midfielder Thiago Alcantara in the playmaker role instead of Xavi.
In the absence of Carles Puyol and Gerard Pique, both suffering with injuries, Javier Mascherano and Eric Abidal teamed up in the centre of Barca´s defence, where they were quickly found out.
Karim Benzema, who has scored eight for Real during the pre-season, beat Abidal on the edge of the area and squared for the advancing Mesut Özil to slot past Victor Valdes.
Penned back in their area, Barca struggled to mount a single shot until Messi fed Villa wide on the left.
The Spanish striker cut inside Sergio Ramos and from the edge of the area curled a shot over Iker Casillas and into the top corner.
Benzema wasted couple of good opportunities and then on the stroke of halftime Barca hit Real with another sucker punch.
Messi scampered away toward the area, and as white bodies converged on him a lucky deflection saw him emerge, unmarked into the area to slide the ball underneath Casillas.
Real lifted their game again after the break and when Alonso drilled a low shot in the corner, Barca were once again on the rack.
Roared on by the home fans Real had their chances but failed to make them count, while Pep Guardiola sought to tighten up his side introducing Xavi and Pique, and he successfully defended his unbeaten record as coach at the Bernabeu.