"It means a lot at this stage of my career," said Djokovic, who was last in the top spot nine months ago.
This is his 102nd week atop the men's rankings overall, the eighth-most in history.
In all, there were eight changes in the top 10 a day after Djokovic beat Federer 6-7 (7), 6-4, 7-6 (4), 5-7, 6-4 for his second championship at the All England Club and seventh Grand Slam title.
The 27-year-old Serb first reached No. 1 after earning the 2011 Wimbledon trophy.
He's also the first man to qualify for the 2014 season-ending ATP World Tour Finals, earning a berth for the eighth consecutive year. Djokovic has won that event three times, including in 2012 and 2013.
Andy Murray dropped five ranking spots to No. 10 on Monday by losing in the quarterfinals a year after becoming the first British man since 1936 to win Wimbledon.
Federer, who was bidding for a record eighth title at the grass-court major tournament, swapped places with Swiss countryman Stan Wawrinka, the Australian Open champion, who slid to No. 4.
The two losing Wimbledon semifinalists moved up to career highs after getting to the final four at a major tournament for the first time: Milos Raonic of Canada is No. 6, and Grigor Dimitrov of Bulgaria is at No. 9. Raonic had been No. 9 before Wimbledon, while Dimitrov was at No. 13.
The biggest jump in the top 100 was made by Nick Kyrgios, a 19-year-old Australian who beat Nadal in the fourth round last week. Kyrgios went from 144th to a career-best 66th, a 78-place rise.
In the WTA rankings, Petra Kvitova's second Wimbledon title allowed her to improve two places to No. 4.
The woman she beat 6-3, 6-0 in Saturday's final, 20-year-old Eugenie Bouchard, reached the top 10 for the first time at No. 7.
Bouchard, up from No. 13, is the highest-ranked Canadian in WTA history. She is also the first player from her country to reach a Grand Slam singles final.
The top three places did not change, with Serena Williams at No. 1, Li Na at No. 2 and Simona Halep at No. 3.