Djokovic knocked back four match points in defeating fifth-seeded Jo-Wilfried Tsonga 6-1, 5-7, 5-7, 7-6 (8-6), 6-1. Federer earlier completed a comeback for a 3-6, 6-7 (4-7), 6-2, 6-0, 6-3 victory over No. 9-seeded Juan Martin del Potro.
Those decisions set up a Friday semifinal rematch between Djokovic and Federer. They met in the semis last year in Paris with Federer winning in four sets. Djokovic hasn't lost a match in a Grand Slam event since, winning at Wimbledon and the U.S. Open last year and the Australian Open in January.
Djokovic jumped out to a set and a break lead before Tsonga staged a spirited charge into the lead with two breaks in each the second and third sets.
With the fourth set on serve, Tsonga had four match points that Djokovic survived. Tsonga had a 4-2 edge midway through the tiebreaker but Djokovic again rallied, taking the set when a Tsonga return went into the net. Djokovic was in control throughout the final set.
Del Potro had three first-set breaks and another in the second in building the 2-0 set lead but he had just three break chances the rest of the way, winning none. Federer won nearly two-thirds of the points in the last three sets, holding del Potro to eight points in the fourth set.
Federer won about three-quarters of the points on serve in his comeback.
The other semifinal will be decided Wednesday when second-seeded Rafael Nadal, shooting for a record seventh French Open championship, takes on 12th-seeded Nicolas Almagro and fourth-seeded Andy Murray players No. 6 David Ferrer.