Marin Cilic will play the winner of the first-round match between France's Gael Monfils and Argentina's Horacio Zeballos in the second round.
Rafael Nadal beat Carlos Berlocq to earn a title clash in Argentina Open. He will face Argentina's Juan Monaco.
It was the second ATP final of the 30-year-old Argentine's career.
Djokovic dropped his serve to fall behind 2-1 in the opening set but broke back immediately and took control from there against his 32-year-old opponent.
Nadal owns bragging rights in Barcelona after winning seven titles in eight editions and posting a 36-1 lifetime record at the Catalan venue.
Nadal has won seven out of the last eight editions in Barcelona, missing out only in 2010 when he did not play due to injury.
Scotland's Murray, the reigning US Open champion and gold medallist at last year's London Olympics, next faces either seventh-seeded Juan Martin del Potro.
Nadal, who is recovering from a knee injury, at times appeared a bit tentative but used powerful serves and brilliant drop shots to tame his opponent.
The Japanese star, who reached the quarter-finals of last year's Australian Open in the best ever Grand Slam performance by a Japanese man, had a battle in a 69-minute opening set.
It was a mixed day for Indian tennis as Sania Mirza of India and Nuria Llagostera of Spain moved into the women's doubles final of $4.8 million China Open tennis championship while Mahesh Bhupathi and Rohan Bopanna were knocked out in the quarter-final.