Following early exits in Barcelona, Monte Carlo, Miami and Indian Wells, the 30-year-old Djokovic struck his shots with precision and recorded 26 winners to improve his head-to-head advantage to 12-2 against world number 20 Nishikori.
Djokovic was broken to love at 2-2 but he recovered well by pouncing on his opponent’s second serve to clinch the opening set in just over an hour.
The two-time winner in Madrid went on to claim a decisive break in the 10th game of the second set to wrap up the contest.
It was Djokovic’s first victory over a top-20 opponent since the Serb overcame Gael Monfils at Eastbourne in June last year.
Earlier in the day, Canada’s Milos Raonic booked a second-round meeting with third seed Grigor Dimitrov, defeating Argentina’s Nicolas Kicker 6-3 6-2.
Raonic recorded 17 aces to knock out the Madrid debutant.
Frenchman Lucas Pouille, seeded 15th, crashed out of the tournament after a 6-2 6-3 defeat by compatriot Benoit Paire.
Paire claimed his first victory in four attempts against Pouille and will next face Canadian teenager Denis Shapovalov.