Djokovic, who is seeking his first French Open title, rebounded from a slow start to overcome Italy's Andreas Seppi 4-6, 6-7 (5-7), 6-3, 7-5, 6-3 at Stade Roland Garros.
The win extended Serb's Grand Slam winning streak to 25 matches and put him into the quarterfinals of his 12th straight Grand Slam event.
He'll next face either France's Jo-Wilfried Tsonga or Stanislas Wawrinka of Switzerland, whose Sunday match was under way.
Also advancing Sunday was Federer, the 2009 French Open winner and four-time runner-up. The Swiss superstar got past Belgian David Goffin 5-7, 7-5, 6-2, 6-4.
His next opponent will be the winner of Sunday's Tomas Berdych-Juan Martin del Potro match-up.
Ohio bar shooting arrested, charged with murder
LGBT community has 'bullied the American people': Bachmann