Despite pushing the 13-time Grand Slam victor to three sets, the native of Thornhill, Ont., couldn't solve Djokovic, losing 7-5, 4-6, 6-3 in the quarterfinal of the Western and Southern Open on Friday.
Federer has won 14 straight matches in Cincinnati and 17 of his last 18 sets. But he faces the greatest test any server can against the Djokovic return. Six men's and three women's singles matches were held over from Thursday because of rain.
Djokovic led the crowd in cheers and pumped his fist after ending his long day.
"It's quite unusual to stop for lightning", Federer said.
"I'm here to enjoy a sport that I love, I've got plenty of motivation".
"So on the baseline I was feeling good".
The Romanian rallied from a break down in the first set, as Barty won three of the first four games. After losing his serve, Djokovic bashed his racket on the court three times, sending pieces of the frame flying.
With both players near their consistent best, Wawrinka saved two break points in the sixth game, while Federer offered his compatriot none.
"I'm not proud when I break the racket, especially I know there are kids around and watching and I'm not proud of it", he said.More news: Jose Mourinho will be gone by Christmas, predicts Lee Sharpe
More news: Challenged by US and market crisis, Turkey turns to Europe
More news: Man United Manager Makes Huge Announcement: Setback For Pogba
"But that's how it goes sometimes, you've got to take them and move on".
The five-time Cincinnati runner-up ousted Croatian Maric Cilic 6-4 3-6 6-3 in two-and-a-half hours in his bid to claim the only ATP Masters tournament he is yet to win.
Rodger Federer (SUI) serves against Leonardo Mayer (ARG) in the Western and Southern tennis open at Lindner Family Tennis Center. Then, it was off for a little rest before play Wawrinka, the second match of the day for both players.
"Waiting around all day and hardly seeing any tennis obviously is never fun for the tournament and the fans", Federer said.
Cilic came into the contest having won their last two meetings, including victory in the Queen's final earlier this year, and also with the knowledge that he had a touch more pedigree at the venue. He got into a flow after the players warmed up again.
He said: "For sure it was a great level". I was serving 100 miles per hour first serve and I felt my arm and my shoulder. "It was a different kind of serve because I was serving differently because of the speed of my ball, and it would have been tough to win".
She's expecting a lot of attention at the U.S. Open, where she reached the final previous year and lost to Sloane Stephens - her best showing in a Grand Slam event.
Czech Republic's Petra Kvitova was a 7-5, 5-7, 6-3 victor against Belgium's Elise Mertens to reach the last four.
The former top tennis player in the world defeated Canadian player Milos Raonic 7-5, 4-6, 6-3 for a place in the semis.