The 18-year-old proved a challenge for the second seed, taking the match to four sets.
Djokovic dominated in the first set closing 6-2, but a double fault from the Serb in the second set allowed Tomic to take the lead at 1-3, which he held to win the set 3-6.
Tomic held the momentum into the third set, securing the first two games before last year’s semi-finalist resumed his stride and took the set 6-3. The youngster held on into the fourth set but was finally beaten 6-2 3-6 6-3 7-5.
Djokovic will face either Jo-Wilfried Tsonga or Roger Federer in the semi-finals.