The pair matched each other stride for stride in the opening set, with Stepanek doing his best to mix up his play and disrupt the world number one.
The Czech was serving to stay in it at 5-4, but then Djokovic turned on the style, finding the mark with a passing shot on his way to breaking serve.
That put the Serbian in front, but he found Stepanek just as stubborn in the second set.
Djokovic eventually secured the break in the eighth game, which was all he needed for a two-set lead.
Stepanek managed to create one of only two break points in the third set, which - if taken - would have seen him serve to force a fourth set.
However, Djokovic produced a massive ace before going on to hold.
Again, the Serbian broke Stepanek's serve at 5-5 to move ahead at the vital moment in the set.
Djokovic wrapped up the match with minimal fuss to set up a fourth-round meeting with the winner of Sam Querrey and Stanislas Wawrinka.