Djokovic beat Federer for the title at Wimbledon last month.
The U.S. Tennis Association followed this week's ATP rankings in announcing the seedings Tuesday.
Federer moved up one spot from his No. 3 ranking because 2013 champion Rafael Nadal withdrew from the year's last Grand Slam tournament with an injured right wrist. The 33-year-old Federer is seeded at the US Open for the 14th consecutive year, tied with Ivan Lendl for the longest streak, trailing only Jimmy Connors' record of 18.
Federer won the hard-court tournament every year from 2004-08, part of his record 17 Grand Slam titles.
Djokovic has played in the last four finals at Flushing Meadows, winning the title in 2011. He lost to Nadal in 2010 and last year, and to Andy Murray in 2012.
The women's seedings will be announced Wednesday, and the draw is Thursday.
The tournament starts Monday.