Djokovic is set to take the world No 1 sport off Nadal when he competes at the ATP Finals in London next week.
Nadal was due to play at the O2 but has withdrawn in order to undergo ankle surgery.
The Spaniard is hoping to be fully fit for the 2019 season, which begins in January.
And he was spotted Tuesday leaving a Barcelona hospital after going under the knife.
Rafael Nadal was seen on crutches, with his right ankle bandaged up.
The Spaniard tweeted on Monday: “Hi All: I write these words as it is the end of my season.
“It has been a complicated year, very good at the tennis level when I have been able to play and at the same time very bad as far as injuries are concerned.
“I have done everything possible to get to the end of season in good condition, both for Paris and London, doing things well and I really wanted to play.
“Unfortunately I had an abdominal problem in Paris last week and I also have a cyst in my ankle joint that has to be removed in the operating room today.
“It is true that we had detected this for some time and it occasionally bothered me. However, since the problem in the abdominal muscle also prevents me from playing in London, we’ve taken the time to remove the cyst and avoid future problems.
“This way I hope to be in full condition for next season. Thank you all for the support.”
Novak Djokovic has replied to the statement, saying: “Sending my best wishes and hopes for fast recovery after surgery my friend.”
Djokovic boasts a W27 L25 record against Nadal and beat the Spaniard in five sets in the Wimbledon semi-finals this summer.
Meanwhile, Roger Federer has discussed his rivalry with Djokovic.
“It’s intense. It’s good tennis,” Federer said.
“We care about winning. We don’t like losing. So I can tell you that right now.
“And yeah, it was a fun week in Chicago (in the Laver Cup). I really enjoyed playing doubles with him.
“I think it was interesting for both of us to see into our minds and into our lives a little bit more.”