The two-time Olympic medallist had been recovering from surgery in February, but suffered a setback a few weeks ago that led him to require an additional intervention that will rule him out for the rest of the year.
Federer made the announcement on his Twitter account, where he wrote: “A few weeks ago, having experienced a setback during my initial rehabilitation, I had to have an additional quick arthroscopic procedure on my right knee.
"Now, much like I did leading up to the 2017 season, I plan to take the necessary time to be 100 per cent ready to play at my highest level.
"I will be missing my fans and the tour dearly but, I will look forward to seeing everyone back on tour at the start of the 2021 season."
Switzerland’s Federer, who won an Olympic gold medal alongside Stan Wawrinka in the Beijing 2008 doubles tournament, recovered from a similar injury on his left knee in 2016 and went on to win two Grand Slams.
While he has a total of 20 Grand Slam final wins to his name, the Olympic singles title has so far eluded the Swiss maestro. The closest he has come was a silver medal at London 2012, where he lost in straight sets against Great Britain’s Andy Murray 6-2 6-1 6-4.
The 38-year-old Federer has not played competitively since a loss against Novak Djokovic in the semi-final of the Australian Open in January. He now looks set to miss out on a full calendar year’s worth of tennis, including the US and French Opens.
Crucially, a 2021 return would mean that Federer has a good chance of being fit in time for Tokyo 2020 - a tournament he has already expressed his eagerness to be involved in.
In October 2019 following an exhibition match in Tokyo, Federer announced that the Olympics were a key focus for the 2021 season: "I knew I always wanted to play at the Olympics but I didn't know if I could do everything because I'm not the youngest anymore and I have to pick my moments."
"But I just felt like the Olympics, I can do it and I want to do it so let's do it. I reached out to the team and said can I announce it here while I am actually in Tokyo?
"So finally I decided and I couldn't be happier and I'm super excited."
Will a fit and rested Roger Federer finally win an elusive gold medal at Tokyo 2020?