Nadal held off a surging Djokovic to win 6-4 3-6 7-6(2) in a pulsating semi-final that resembled a heavyweight boxing showdown with the duo trading breathtaking winners.
The victory was Nadal's second successive over Djokovic at this stage of a tournament following his epic five-set triumph on clay at the French Open in June.
"To beat Novak on any surface is very important," Nadal said in a courtside interview. "His level is always high and you have to play well ... almost perfect to beat him."
Nadal made a flying start in front of a capacity crowd as Djokovic was unusually tentative and struggled on serve.
But the lull did not last long as the Serb, two time defending champion, stormed back into the contest, unleashing some crunching forehand winners as he drew level.
With the audience roaring their approval at every thrilling rally, Djokovic looked to have the momentum in the match as he continued to find success in going for his shots, keeping his opponent pinned on the baseline.
But all the while Nadal showed off some magic of his own and it became clear that this high-quality encounter, the 36th between the pair, would need a tiebreak to settle the issue.
Nadal went up another gear in racing a 6-0 lead in the breaker but even in defeat Djokovic went down swinging.
He saved two match points with winners before a forehand drifted long to hand the Spaniard a first hard court victory over his rival since 2010.
"It was a very close match," Djokovic said. "There were very few points that decided the winner.
"I had my chances. He had his chances. At the end he played better."
Raonic had earlier advanced to his first Masters series final when he recovered from a mid-match slump to win a third set tie-break 6-4 1-6 7-6(4) against wildcard and compatriot Vasek Pospisil.
Meanwhile, Andy Murray and Colin Fleming made it into the final of the men's doubles with a 6-3 6-0 victory over Daniel Nestor and Robert Lindstedt.
Murray and Fleming will face Alexander Peya and Bruno Soares in the final after they defeated Mariusz Fystenberg and Marcin Matkowski 6-2 7-6(3).