The world number one saw off in-form Miomir Kecmanovic, ranked at 38 in the world, 4-6, 6-3, 6-3.
Djokovic, chasing a third title at the Serbia Open and a fourth ATP Tour title overall in his home city, will face third seed Karen Khachanov for a place in the final.
"Kecmanovic was very solid, he was not missing much. He was really moving well but generally I felt better than I did yesterday even if I was a set and a break down," said Djokovic.
"I felt gamewise I took it up a level or two. I believed I will get my chances. When they are presented to me, I use them."
Djokovic had also needed three sets to beat Lazlo Djere in his opening round on Wednesday as he gears up towards the defence of his French Open title in Paris next month.
"Physically I managed to push through again. Another two and half hour match and I am not too tired," continued Djokovic.
"(Kecmanovic) helped me a little bit, he made some unforced errors towards the end of the second to give me the break. After that it was a whole different story.
"In the third, it was even up to three all and after that I played the best three games of the match."
The Belgrade event is only Djokovic's third of 2022 after he was deported from Melbourne - and denied the chance to defend his Australian Open title - after entering the country unvaccinated.
He was also barred from playing at the Indian Wells and Miami Masters over his controversial Covid-19 stance.
The 34-year-old made the last-eight in Dubai in February and then lost his opening match at the Monte Carlo Masters last week.