He will face the victor of the late night match between number 8 seed Dominic Thiem and Borna Coric, who knocked number one seed, Andy Murray out earlier in the week.
"One break was enough, 5-4, 6-5, both sets", Djokovic said in his post-match interview.
The 12-time Grand Slam champion ended his long and successful relationship with Marian Vajda last week in an attempt to reverse his dramatic slump in form since winning Roland Garros a year ago.
Second seed Djokovic dug in deep to see off Spaniard Feliciano Lopez 6-4, 7-5 in a third-round clash yesterday.
And the lanky Canberran did it with nearly Roger Federer-like ease in the 6-3 6-3 victory that took little over an hour.More news: 14th GST council meet starts in Srinagar
Fifth seed Milos Raonic is also into the last 16 as he got the better of a battle between two big servers, winning 6-4, 6-4 against Gilles Muller. Raonic will play Belgium's David Goffin next.
Novak Djokovic of Serbia gestures after defeating Nicolas Almagro of Spain 6-1, 4-6, 7-5 during a Madrid Open tennis tournament match in Madrid, Spain, Wednesday, May 10, 2017.
The world number two won a weird point at 5-4 up when he stopped briefly to check the mark on the court as he thought a Lopez shot had landed long, but still looped a return tamely over the net to leave the Spaniard flat-footed and confused.
"It's true I've been through some hard days with the issue of my ear (infection), which cost me a little bit of general stability", Nadal said.
"I just felt it in the last game". "Obviously he didn't play very good today".More news: CO man expected to be released from prison, arrested by ICE
"It's the first match without my team that's been with me for 10 years", he said.
"I think that even though I played really badly, my attitude has been very positive", Nadal explained. I won a couple rounds and lost to Rafa.
In the Women's Madrid Open, defending champion Simona Halep cruised back into the final for the third time in four years with a 6-2, 6-3 success over Latvia's Anastasija Sevastova.
Nadal, a four-time champion in Madrid, had an easier time in the second set after earning an early break, and closed out the match with another at the end.
Croatian Borna Coric, conqueror of world number one Andy Murray in the third round, plays Dominic Thiem of Austria later on Friday with the victor meeting Pablo Cuevas in the other semi-final after the Uruguayan beat German Alexander Zverev 3-6 6-0 6-4.More news: FAA's drone registration rule suffers major setback
Predominantly playing the slice, Lopez hit the drop shot effectively at times to drag his opponent forward, but Djokovic drained errors or shot balls from the Spaniard's one-handed backhand as well.
- Sweden drops prosecution against WikiLeaks founder Julian Assange
- Lakers Rumors: Possible trade packages for the second overall pick
- Paytm raises USA $1.4 billion from SoftBank
- Chinas Xi wants ties with South Korea to be on track
- Trump White House enters a new state of denial
- Stanley Cup playoffs: Josi's late goal gives Predators 2-1 series lead
- Arsenal's Granit Xhaka doubtful for Southhampton clash due to injury
- Haryana HBSE 10th Result 2017
- Almodovar and Smith's comments on Netflix at Cannes
- Hahn, Barnes share Byron Nelson lead with stars lurking