The 41-year-old Swiss will bow out later on Friday when he partners with great rival Rafa Nadal in a doubles encounter at the Laver Cup.
Federer, who owns 20 Grand Slam singles titles including a record eight at Wimbledon, announced last week that he would be calling time on his career because of a persistent knee injury.
McEnroe is captaining a Rest of the World team for the three-day Laver Cup at London’s O2 Arena where a sell-out crowd will watch Federer and Nadal in action.
“Obviously there is a void that will never be filled,” McEnroe told reporters at a pre-event news conference.
The American said Federer’s four Grand Slam titles after turning 30 was an incredible achievement. His last came at the Australian Open in 2018.
“I remember six years ago when he limped off the court at Wimbledon, didn’t play for six months, and ended up winning three majors in the next 18 months,” McEnroe said.
“Then he had match point on Novak at Wimbledon (2019), two of them. So this is beyond belief what him and the other two guys have done.”
Asked if he could offer Federer and retirement advice, McEnroe said: “He doesn’t need my advice. He’s in a great position. He’s a total class act. We all know that.
“He loves the sport. That’s part of why he won so much, in my book. He loves it. I’m hopeful that he, and I believe he will, be around it in some way, shape, or form.”