Djokovic, who will face Kevin Anderson in the final on Sunday, recorded a 6-4 3-6 7-6 3-6 10-8 win over Nadal after five hours and 16 minutes of high-quality tennis in the English capital.
Djokovic led by two sets to one when play stopped on Friday night, with the Serb winning a tie-break in the third after a high-energy first two sets.
Nadal raced into a 3-0 lead in the fourth set before Djokovic won three straight matches to level it at 3-3.
The Spaniard secured another break at 4-3, however, before holding to ensure that the last-four affair would enter a fifth set.
A dramatic fifth saw both players hold their first eight services, but Djokovic edged 9-8 ahead before finally breaking the Nadal serve to take the fifth 10-8.
Nadal and Djokovic had not faced each other this deep into a Grand Slam since the 2014 French Open final, and they served up a classic at Wimbledon to resume their long-standing rivalry on the big stage.
Djokovic is bidding to win his first Grand Slam title since 2016.body check tags ::