His surgery was carried out in Barcelona by doctors Jaume Vilaro and Angel Ruiz-Cotorro.
The Serb is back on the top of the pile for the first time in two years, at the end of a roller-coaster season for the 14-time major victor. Play in London begins next Sunday.
"Unfortunately I had the abdominal problem in Paris last week and I also have an issue in the ankle joint that has to be removed in the operating room today", the 17-times Grand Slam victor wrote on Twitter.
"We had detected this a while ago and it has bothered me every now and then, but since the problem in the abdominal muscle will prevent me from playing in London we will make the most of this moment to intervene in the ankle and to avoid future problems".
"With this, I hope to be in full health for the next season".
"Thanks to all for the support".
Djokovic moved up from No. 2 to overtake Rafael Nadal on Monday.
After his success at Roland Garros and a run to the semi-finals of Wimbledon, Nadal did enjoy hard-court success, beating Stefanos Tsitsipas in the final of the Rogers Cup .
Djokovic has also not been afraid to take chances and innovate his game, bringing in Boris Becker as part of his coaching team for the start of the 2014 season, although he has since reunited with long-time mentor Marian Vajda.
Nadal confirmed Monday he would skip the end-of-season finals in London to undergo ankle surgery.
Novak Djokovic is the top seed in this group and is pitted against Alexander Zverev, Marin Cilic and John Isner, which on paper definitely looks like the tougher group of the two, especially given the surface and conditions.