Five-time champion Federer, 34, bidding to become the oldest New York champion since 1970, swept past Swiss compatriot Stan Wawrinka 6-4, 6-3, 6-1
Djokovic, the 2011 champion, booked a place in the final for the sixth time with a record 6-0, 6-1, 6-2 rout of defending champion Marin Cilic in the most one-sided US Open semi-final of the modern era.
Sunday’s clash will be a rematch of July’s Wimbledon final, where Djokovic triumphed to claim his ninth career Grand Slam crown.
Federer, the holder of 17 majors but without a Grand Slam title since Wimbledon in 2012, will take a 21-20 career edge over Djokovic into the championship match, having won their last duel in Cincinnati in August.
The Swiss legend was imperious against Wawrinka and his victory means he has not dropped a set since the Wimbledon final, a perfect stretch of 28 sets, as he reached a seventh US Open final.
“I’m very happy. It’s been a great tournament so far, I have tried very hard in the last six years to get back to the final and tonight it worked,” Federer said after his 92-minute win sealed by a 10th ace.
“I am playing at a good level, possibly my best. I am serving very well, going for my shots.
“I’d love for it to keep working for one more match.”
Federer is the oldest finalist in a Slam since 35-year-old Andre Agassi at the 2005 US Open, which the Swiss star won.
On Sunday, he will face Djokovic for the sixth time this year — all have been in finals.
“Novak has had a tremendous year. There’s a lot on the line. He could win his third Slam of the year while I can win my first for some time.
“He’s the best mover on hard courts. He will be tough to beat but I am ready for the challenge,” said Federer, the champion from 2004-2008 and runner-up to Juan Martin del Potro in 2009.
Cilic suffers record rout
Federer was defeated by Wawrinka in their last clash in the French Open quarter-finals in June, when his compatriot went on to the title.
It was just one of three losses against 16 wins with all three setbacks coming on clay.
Federer converted the only break point he carved out in the opening set to lead 2-1 and saved three when Wawrinka threatened in the sixth game.
The 30-year-old Wawrinka had to save five break points to nip ahead 3-2 in second set, three from 0-40 down.
But he cracked in his next service game as Federer broke for 4-3 and again in the ninth game, when he was broken to love and Federer opened a two-sets lead having won 16 of the last 17 points.
Federer was unstoppable now, breaking the outclassed Wawrinka in the fourth and sixth games on his way to his 27th Grand Slam final.
Djokovic’s rout of Cilic was the most lopsided semi-final of the Open Era at the tournament, beating Lleyton Hewitt’s 6-1, 6-2, 6-1 defeat of Yevgeny Kafelnikov in 2001.
Djokovic has now reached the finals of all four majors this year, winning the Australian Open and Wimbledon titles and finishing runner-up to Wawrinka in Paris.
Sunday’s final will be his 16th in the last 21 Grand Slams and 18th overall, tying the record of Pete Sampras.
It took Djokovic just 85 minutes to see off Cilic, whose hopes were undermined by an ankle injury.
The ninth seeded Croatian committed 37 unforced errors and took just 13 points off the Djokovic serve.
“Marin has had an ankle injury for a few days now so he was very courageous to come out and finish the match,” said Djokovic, who will be chasing a 10th Grand Slam title on Sunday.
“It’s never easy knowing that your opponent is not 100 percent but I had to show good intensity and stick to my game plan.”
“It’s a great achievement to reach the finals of all four majors in the same year for the first time. It’s where you want to do your best.”
It was Djokovic’s 14th win in 14 meetings against Cilic.
“I haven’t been 100 percent with my ankle and Novak exposed it more than any other player,” said Cilic.
“I thought about not playing but I decided to play as it is a Grand Slam tournament. Anywhere else I would have pulled out so as not to aggravate it.”