The top seed needed five sets to defeat the seven-time champion, ensuring that he will return to the top of the world rankings when they are updated tomorrow.
Speaking on court at the end of the match, the Serb said: "First of all I want to congratulate Roger it was a great match to be a part of he is a magnificent champion and a great example of a great athlete and a role model. I respect everything you have done and thanks for letting me win today.
"That's why he has 17 Grand Slams because at important times he comes up with those shots. After losing the fourth set it wasn't easy to go on and win the fifth set, I don't know how I did it.
"This is the best tournament in the world and the one I always wanted to win so to be able to compete at such a high level I am so grateful."
Djokovic first won the title at SW19 in 2011.