On Sunday, Nadal will try to beat Federer for the sixth time in eight Grand Slam finals.
"Beating Novak today was maybe a good birthday gift for him because he lost his four previous matches against Novak," Federer said of Nadal, who turned 25 on Friday. "I'm going to play against Nadal, my main rival, in another Grand Slam final. We live for these moments."
In the women's final, defending champion Francesca Schiavone will face Li Na on Saturday.
Djokovic entered the French Open as the hottest man on tour. He won every tournament he had played in 2011, including earning his second Grand Slam title at the Australian Open after beating Federer in their second straight major semifinal.
But for Federer, three times in a row was too many.
Despite ending Djokovic's run, things won't get any easier against Nadal.
Federer is 8-16 against his main rival, and 2-6 in Grand Slams. He has already lost to Nadal twice this year, in the semifinals in Key Biscayne, Fla., and in Madrid.
Djokovic had not played since Sunday, when he beat Richard Gasquet in straight sets in the fourth round. His quarterfinal opponent, Fabio Fognini, withdrew a day later, giving the Serb a free ride into the semifinals.
"What I would like to say, and I said it to him at the net, is that his record, although it's not the best because other players have done better - today it's so physical and professional - what he achieved is unbelievable," Federer said.
Nadal reached his sixth final in seven years at Roland Garros by beating the fourth-seeded Murray.
Since opening the tournament by falling behind two sets to one against John Isner, Nadal has won 17 sets in a row.
The Spaniard's only loss at the French Open came two years ago when he was defeated by Robin Soderling in the fourth round. But he came back in 2010 and won his fifth title, beating Soderling in the final. This year, Nadal beat Soderling in the quarterfinals.