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.
And a 7-5 6-1 victory over Joao Sousa in his opening match in Paris this week means he has now won 28 straight sets since dropping the third to Tennys Sandgren in round two of the US Open.
The 16th seed knocked out France's home hope Richard Gasquet 6-3, 6-3.
Less than an hour before his scheduled second round match against Fernando Verdasco, Nadal said his doctors had advised him to pull out of the tournament due to concerns about a pain in his abdomen. It's been a tough year for me with injuries.
Federer showed fighting qualities last week in Basel, where he was twice taken to three sets and went an early break down in three of his last four matches. I've practiced with the guys and felt, in terms of tennis, better than I thought one week ago. After Paris the ATP tour's eight top-ranked players congregate in London from November 11 for the season's Finals. "I know something very bad happened inside there", Nadal said. I feel like I recovered well from last week. "With my performance today I gave myself the best present I good ask for for tomorrow".
Prince Harry and Meghan Markle New Zealand Day 2 highlights
The country is the final stop for the royals who are on a 16-day tour which has seen them also visit Australia, Fiji and Tonga. The 24-hour crisis service offers free community helplines and text message support to people in New Zealand.
Nadal has dealt with off-and-on knee problems for years and the 32-year-old Spaniard prefers to be cautious.
"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".
Saudi Arabia has faced criticism following the recent death of journalist Jamal Khashoggi, a critic of the Saudi government who was killed at the country's consulate in Istanbul in October.
Serbian Djokovic lost his top ranking to Andy Murray after the 2016 ATP Masters 1000 event in the French capital but has fought his way back to the summit this year.
Sock next faces No. 6 Dominic Thiem, who used 14 aces as he rallied to beat No. 11 Borna Coric 6-7 (3), 6-2, 7-5.
Gilles Simon was the only one of six Frenchmen to advance on Tuesday, defeating compatriot Lucas Pouille 6-3, 6-4, with Pierre-Hugues Herbert and qualifier Benoit Paire losing to Mikhail Kukushkin and Marton Fucsovics respectively.