Madrid started the stronger of the two sides and got their reward with an early Karim Benzema goal, while Malcom equalized for Barcelona, who lacked some of the midfield control which usually typifies their play.
After 48 hours of speculation over his fitness due to a thigh problem, Leo Messi started the game on the subs' bench with Brazilian winger Malcom given his chance in the starting 11.
Real Madrid coach Santiago Solari preferred Brazilian teenager Vinicius Jr to Gareth Bale, who also had to settle for a place on the bench, while Marcos Llorente was given the nod ahead of Casemiro.
Madrid were much faster out of the blocks that Barca and Tony Kroos had already seen a shot palmed away by Marc Andre Ter Stegen before Benzema opened the score in the fifth minute.
Vinicius' cross was long, but Jordi Alba on the far post misread it allowing Lucas Vazquez to pull it back for the French striker to nip in ahead of Clement Lenglet and prod the ball home.
Barca took time to get into the game, but began to create chances, despite struggling to control midfield.
Malcom missed a chance when through on goal and was probably grateful to see the offside flag, but was Bara's most incisive player as the game opened up.
Semedo saw a dangerous ball cut out and Sergio Busquets headed the winger's free kick onto the bar, before Keylor Navas did well to parry Luis Suarez's effort from outside of the penalty area.
Malcom got Barca level 12 minutes into the second half after Keylor Navas blocked Jordi Alba only for the ball to fall to Suarez whose shot hit the post and fell to the winger, who took a touch before curling a shot into the Madrid net.
Bale replaced Vinicius and Messi came on for the ineffective Philippe Coutinho on the hour and almost immediately forced a free kick, which he hit into the defensive wall.
Barca had more of the ball in the second half, but Bale had a chance to restore Madrid's lead after Ter Stegen made a mess of a clearance and was out of his ground. However, the Welshman took too long and Semedo charged his shot down.
The result gives Madrid and advantage for the return leg, but Barca will know that with a fit Messi in their side they are capable of winning anywhere.
More about: Barcelona-FC Real-Madrid