Images of Federer and Rafael Nadal - who shared one of tennis's most enthralling rivalries - sitting together and crying after combining in a Laver Cup doubles defeat at London's O2 Arena on Friday went viral on social media.
Djokovic and Andy Murray - two of Federer's other main rivals - were also present for the 41-year-old's final bow.
"It was just a very touching, very emotional moment," Djokovic told reporters on Tuesday in Tel Aviv, where he will play an ATP 250 event this week.
"Seeing his kids and his family, it got me emotional as well. I also must say I was thinking about how it would look for me when I say goodbye to tennis.
"There is definitely one thing that I will wish to have, other than, of course, my family and the close people in my life, I would love to have my biggest rivals and competitors there. Because it added something more special, added more importance to that moment."
The 35-year-old Serb, who is one major title behind Nadal's men's record of 22, said felt no issues with his wrist, which had been bothering him during the Laver Cup in London last week.
Djokovic said the Spaniard remains his biggest rival.
"We played the most matches against each other of any other rivalry in the history of tennis," said Djokovic, who missed the Australian and US Opens this year due to not being vaccinated against Covid-19.
"The rivalry is very special and keeps going. Hopefully, we'll get a chance to play against each other more times. Because it's exciting for us and also for tennis fans and sport fans around the world."