The Serb sucked the atmosphere out of Centre Court as he dramatically broke back in the final set before coming through 7-6(5) 1-6 7-6(4) 4-6 13-12(3) – the longest final in SW19 history.
Djokovic closes the gap on Federer in the all-time Grand Slam charts to four: 20 plays 16. Rafael Nadal is sandwiched between on 18.
Federer, who turns 38 in August, was bidding to became the oldest player to win a major in the Open Era.
"I think this was if not the most exciting and thrilling final I've been a part of, then definitely in the top two or three of my career – and against one of the greatest of all time in Roger who I respect a lot," Djokovic said on court afterwards.
Unfortunately in these matches one player has to lose. Both of us had our chances. It was quite unreal to have match points against me and come back and then to have a tie-break at 12-12. I was actually hoping I could get to a tie-break. Roger said he hopes he give people the chance to believe at 37 years old and I hope that I am one of them. He inspires me that's for sure.
Novak Djokovic celebrates by eating grass
Image credit: Getty Images
Djokovic somehow emerged from the opening three sets with a 2-1 lead despite failing to muster a single break point.
Federer was more aggressive, unsettling an opponent who had been hardly tested to this point, but his composure wavered at the crunch point in the tie-breaks – something that would ultimately prove his downfall.
Undeterred, the Swiss steamed through the fourth set, even if his impeccable serve was finally breached in the dying embers as Djokovic mounted consolation resistance.
The pair traded breaks in the early stages of the decider before the pivotal moment at 8-7. Federer led 40-15 on serve with two championship points on his racket. He faltered.
Djokovic roared back via deuce and weathered another storm at 11-11 as he survived two break points, soon sending the match to the first ever final-set tie-break in Wimbledon singles history.
The 32-year-old had already won the first two and looked more confident with everything on the line, cracking Federer's serve twice and remaining flawless of his own as he came through 7-3.
"I will try to forget this final, but it was a great match," said Federer.
"It was long and had everything. I had my chances, but so did he. I have to be happy with my performance. But Novak congratulations, that was crazy.
I hope I give some other people a chance to believe around the world. I gave it all I had and I can still stand. I hope the same can be said for all the other 37 year olds. My children won't be excited with the plate, they would be more excited with that golden thing. But it is all good, back to being a dad and a husband.