The Spanish side confirmed their recently improved league form, which has seen them win three out of four domestic matches, with another assured display, reports Xinhua news agency.
Madrid doubled the lead before the half-hour mark when Toni Kroos' freekick deflected against Sergino Dest's back and flew past Jordi Alba on the line, reports DPA.
Barca coach Ronald Koeman repeated the starting eleven that had won 6-1 away to Real Sociedad two weeks ago but his side struggled to find the fluency it showed in San Sebastian
Barcelona's sixth league win in a row lifted it back into second place at seven points behind Spanish league leader Atlético Madrid, which has two more games to play.
Before the match, Barcelona played 'The Song of the Birds' by Catalan cellist Pablo Casals as the teams stood around the centre circle where a Maradona shirt was laid on the centre spot