The 28-year-old Serbian, though, proved too much for the 34-year-old Swiss at the end of the day with Djokovic grabbing his 10th major win in four sets.
Despite the loss, Federer did not speak of the match as a disappointment but was able to take pride in how well he played this summer while complimenting a deserving champion in Djokovic.
"The whole America trip has been fantastic," said Federer who was undefeated since dropping the Wimbledon final in July - also against Djokovic. "I'm very pleased where my game is … Playing Novak was a massive challenge."
Djokovic has now won three consecutive Grand Slam finals played between the pair dating back to last year's final at the All England Club. Sunday's match was their record-setting 14th career meeting at a Grand Slam.
"It's been a good one. Maybe not so much tonight," he said of their rivalry. "I thought it was a great match, enjoyed it, and congratulations Novak."
The Swiss had "one last thing" to tell the Flushing Meadows fans who cheered loudly throughout the match for the five-time winner at Flushing Meadows.
"I love the sport. I have a lot of passion. Last thing, I'll see you guys next year," Federer concluded to the delight of the New York crowd who watched 33-year-old Flavia Pennetta announce her retirement after winning the women's singles title Saturday.
Federer will attempt to keep up his top form through the rest of the ATP season, with hopes of reaching a third consecutive Grand Slam final at the 2016 Australian Open in January.