The 19-year-old Spaniard reached his second Association of Tennis Professionals Masters final in five weeks and claimed his first win over a reigning world number one, overcoming Djokovic in front of a sell-out home crowd at the Caja Magica.
Spanish teenager Carlos Alcaraz came from behind to beat world number one Novak Djokovic 6-7(5) 7-5 7-6(5) to reach the Madrid Open final.
Djokovic, who has yet to win a title this season, rallied from a break down to take the opening set in a tie-breaker and the 34-year-old looked dangerous on his serve as he won 2️1 straight points on it in the opener.
But Alcaraz, who turned 19 this week, showed resilience in the second set as he clawed his way back into the contest, saving a break point and holding for 6-5 before breaking Djokovic to force a decider.
The crowd in the Spanish capital got to their feet when Alcaraz completed his comeback, edging out Djokovic in the deciding tiebreak to become the first player to beat Rafa Nadal and Djokovic at the same claycourt event.
"This gives me a lot of confidence to play the final tomorrow," Alcaraz said on Saturday after the match which lasted three hours and 35 minutes.
"I know that I played a really good game, and for the rest of the season I think I am able to play against the best players in the world and beat them as well, so it gives me a lot of confidence."
He is the youngest player to beat a world number one in 17 years.
Alcaraz showed his all-round ability throughout in his first meeting with Djokovic, pinning the Serbian back with his huge groundstrokes and using his trademark drop shots.
He struck 51 winners to Djokovic's 24 as his aggressive style troubled the world number one.
Bidding for his second Masters 1000 title, Alcaraz will play either defending champion Alexander Zverev or fourth seed Stefanos Tsitsipas in Sunday's final.