The result is great news for Andy Murray who was seeded to meet Djokovic in the final.
Istomin made the vital break in the fifth game of the deciding set, then held service the rest of the way in the marathon four hour, 48-minute match on Rod Laver Arena.
The match featured a little bit of everything.
In a 15-minute opening game, the six-time champion Djokovic saved six break points. In the second set, he appeared to hyperextend his left leg in the third game, and spent much of the following break stretching it over a chair.
In the 10th game of that set, Djokovic saved two sets points after serving a double-fault.
But Djokovic broke in the following game to lead 6-5, then held his service with four consecutive points to take the set.
Djokovic clinched the third set when he successfully challenged a line call.
Istomin had a set point in the 10th game of the fourth set, then went ahead 5-1 in the tiebreaker before slamming down an ace to send it to a fifth-set decider.
Murray is due to play Sam Querrey in the third-round in the early hours of Friday morning UK time.