Even though he was playing against the British No 1, most of the fans in London seemed to be rooting for the Swiss star.
And after completing the 7-6 6-2 win, Federer was quick to acknowledge the support, saying it was one of the most special occasions he had played in during his long career.
"I definitely think it was a special match. The crowd was electric and made it very special for both of us," the 17-time Grand Slam winner told Sky Sports.
He added: "I've been around a long time, but this one was very, very nice. Thanks for making it so cool for us. We've got one more match tomorrow (Monday) but it has been another amazing tournament here at the O2."
Federer has already claimed the Wimbledon title and Olympic silver medal in London this year and is hoping to complete his season with another memorable performance in the city when he faces Novak Djokovic in Monday's final.
As the conclusion of the tournament marks the end of the season, Federer will be relishing every moment out on court.
He said: "It's been amazing year for Andy, myself, Novak and even Rafa (Nadal) - it's unfortunate that he's not around. To get a chance to play Novak in the final is obviously really nice.
"I knew that if I lost today it would be the end of the season so I gave it everything I had. I couldn't be more happy, especially as Andy's finish to the season has been so stellar.
"I'm very pleased and I'm looking forward to tomorrow."