Thiem, who won the Barcelona Open last month and was on an eight-match winning streak, struck an early blow by breaking Djokovic in the fourth game but the Serbian responded by winning the next three games and saved two break points in the eighth.
Earlier in the day two times victor Simona Halep thrashed Viktoria Kuzmova 6-0, 6-0 in just 44 minutes to qualify for the quarter-finals, while number seven seed Kiki Bertens was equally impressive in her last-sixteen tie, beating number 12 seed, Anastasija Sevastova 6-1, 6-2 to continue here progress in Madrid without dropping a set.
But despite the lack of preparation and the physical toll of the illness, Nadal cruised to a 6-3, 6-3 win over Canadian teenager Felix Auger-Aliassime to reach the third round in the Spanish capital.
The match is scheduled for 5 pm local time (4 pm BST) and you can find the Rafael Nadal v Frances Tiafoe live streaming options here. The 17-time Grand Slam champion converted four of his 10 break opportunities, with the last one coming on his sixth-match point of the final game.
Novak Djokovic reached a third Madrid Open final by beating Dominic Thiem in a gruelling semi-final.
Yet once again Djokovic had the edge in the tiebreak, earning three match points and taking the first as Thiem smashed a baseline backhand well out, booking his place in a first final since winning the Australian Open.
Quake of magnitude 6.3 strikes Japans Miyazaki; no tsunami threat
The Japan Meteorological Agency measured the quake at 6.3 and said it struck at a shallow depth of just 20 kilometers (12 miles). The Time also reported that the nation's weather agency did not warn about any tsunami.
Ole Gunnar Solskjaer ready to sell Man United striker this summer
The 23-year-old Anthony Martial arrived Old Trafford from Monaco for about £36m in 2015, but the figure later rose to £58m. The France global only signed a new contract in January, tying him down at Old Trafford until 2024.
Djokovic reaches Madrid Open quarterfinals - Omni Sports
The 31-year-old Serbian was eventually pushed by Chardy in the second set before earning a 6-1 7-6 (7-2) win. The top-ranked player in Men's singles had earlier clinched the Madrid Open title twice in 2011 and 2016.
Nadal is trying to rebound from consecutive eliminations in the semifinals of both Monte Carlo and Barcelona, which marked his worst start to the clay-court season in four years.
Djokovic was at his most unyielding in fending off the Austrian who is regarded as the man most likely to beat either him or Nadal at Roland Garros this month.
"I think everything went very well for me today", said Halep, a two-time champion in Madrid.
"I've had this stomach virus for a few days so this was a very important match for me", the second-ranked Spaniard said.
Simona Halep was last night trying to regain the world number one position when she tackled Holland's Kiki Bertens in the women's final. Don't believe? Check out the latter's reaction after nullifying a break point at 1-2 in the second set.
Halep, victor in Madrid in 2016 and 2017, lost the chance to take over the No. 1 ranking from Naomi Osaka.