Nadal has not competed since retiring with a knee injury against Juan Martin del Potro in the US Open semi-finals on 7 September.
Djokovic, who made a prolific comeback this season, would have regained the top spot if he progressed further than Nadal at the Paris Masters.
Federer's procession came after Novak Djokovic celebrated his return to the summit of world tennis with an even easier stroll into the last eight after Damir Dzumhur had to retire injured in the second set of their third-round clash. I'm happy practicing. I'm happy doing other things, and I didn't want to play there at that time.
The Swiss world number three will play the victor of the tie between France's Jo-Wilfried Tsonga and Croatia's Milos Raonic on Wednesday after receiving a bye in the first round. The 14-time Grand Slam champion's brilliant comeback makes him the first player to reach No. 1 after being ranked below 20th in the same season since Marat Safin in 2000, according to the ATP Tour.
Nadal will play fellow Spaniard Fernando Verdasco, while Federer faces Milos Raonic, of Canada.
"Roger is in the race".
Djokovic endured a prolonged struggle for form and fitness after losing the number one ranking in November 2016, but he has enjoyed a sensational upturn in fortunes since the start of July.
"But I haven't been really reflecting on that, and I haven't been really focusing on that too much because it's the middle of the week".
"They ed me too", the 20-time Grand Slam victor said in Paris, where he is playing at a Masters event.
Federer is coming in hot after winning his 99th career title, in Basel last week.
Japan's Kei Nishikori continued his bid for a place in the season ending ATP Finals in London a 7-5, 6-4 victory over Adrian Mannarino.
German fourth seed Alexander Zverev was another to go through as he beat American Frances Tiafoe 6-4, 6-4.
The Australian Open champion is drawn in the same half as Djokovic, Australian Open runner-up Marin Cilic and big-serving Kevin Anderson, who upset Federer in the Wimbledon quarterfinals this year.