Norwegian Ruud, who had lost to Djokovic in all five of their previous matches, broke twice early in the first set before the Serbian record 24-time Grand Slam champion fought back strongly in the second.
Eighth seed Ruud held his nerve, however, as five unforced errors from Djokovic allowed him to go 3-0 up in the decider and he calmly closed out the victory.
"This is a day I will remember for a long time. Beating a world number one is something I have never done," Ruud said in a post-match interview.
"You know how good these guys are under pressure... he saved so many break points. I was praying, please, let it be a double fault or something. And maybe someone was listening."
It was a day for the underdogs, with the first semi-final being won by Tsitsipas, who upset world number two Jannik Sinner 6-4, 3-6, 6-4 to hand the Italian just his second loss of the season.