The Serbian was made to work hard by his Canadian opponent, particularly in the first set, but eventually won 7-6 (7-5) 6-3.
Djokovic was particularly impressive on his second serve, winning 70 per cent of them, only four per cent less than his first serve success rate, and he hit just eight unforced errors compared to Pospisil's 21.
"It was a great, positive win," Djokovic said. "Vasek is one of my best friends on the Tour. We have known each other for many years. It is never easy playing someone you respect so much and like so much, but we are both professionals and wanted to win the match and you can see that.
"I think the level of tennis was really high. Especially towards the end of the first set and the second set. Credit to him for fighting. It's great to see him back."
The No.1 seed will play Roman Safiullin in the semi-finals after the Russian beat Arthur Rinderknech 6-4 6-1.
Constant Lestienne came through a tight contest with Maxime Cressy, winning 6-7 (4-7) 6-3 7-6 (7-3), and will face No.2 seed Marin Cilic in the other semi after the Croatian was handed a bye after Liam Broady's withdrawal prior to their match.
At the Sofia Open, Jannik Sinner remains on course for a third successive title at the tournament, setting up a final-four encounter with Holger Rune after easing past Aleksandar Vukic 6-2 6-3, with Rune eventually dispatching Ilya Ivashka 6-2 5-7 6-4.
The other semi-final in Bulgaria will see Lorenzo Musetti take on Marc-Andrea Huesler after both won their respective quarter-finals against Jan-Lennard Struff and Kamil Majchrzak.