The top seed had been unbeatable all week, but in the first two sets, the Serbian seemed a little off-colour before securing a 6-7(8), 7-6(3), 6-4 victory over the 22-year-old.
India's biggest tennis tournament is being conducted by the Maharashtra State Lawn Tennis Association (MSLTA) in association with the Government of Maharashtra for the fifth year in Pune with the initial 5-year hosting contract ending this year.
Djokovic battled for one hour and 57 minutes to eke out the result, 7-6(3), 7-6(5) in his favour before a packed centre-court crowd and rallied into the quarterfinals.
In his first game of the season, Daniil Medvedev had to fight tooth and nail, saving nine set points in the opening set of 2023. However, the tennis star did not sweat on Wednesday as he eased past Kecmanovic in straight sets.
Djokovic pushed through the gears while a large audience watched on, hitting his impenetrable groundstrokes with constant depth and accuracy to seize immediate control.