Frenchmen Gilles Simon, Jo-Wilfried Tsonga, Julien Benneteau and Michael Llodra also joined the third-ranked Serb in the last eight.
Djokovic broke Hernych in the second game but dropped serve for 5-4. They also traded breaks in the second set, with Djokovic again claiming the set on Hernych's serve.
"I made a lot of unforced errors today,'' Djokovic said. "I was in control of the match most of the time. With my mistakes, I gave him opportunities to come back in the match. But I'm happy to get through in straight sets.''
Djokovic will next play Mischa Zverev of Germany.
Masters Cup semifinalist Simon outlasted Rainer Schuettler 6-4, 4-6, 6-2 to face Benneteau in the quarters.
After taking the first set, Simon found himself 4-0 down in the second.
"I really wish I could have won in two sets,'' second-seeded Simon said. "I had the opportunities to make it. But I lacked consistency in the key moments. I dropped that (second) set a bit stupidly.''
Benneteau defeated lucky loser George Bastl of Switzerland 6-1, 2-6, 6-1.
Meanwhile, fourth-seeded Tsonga cruised past Simone Bolelli of Italy 6-3, 6-2 to meet Feliciano Lopez of Spain.
Tsonga relied on a strong serve to clinch the first set, hitting seven aces and landing 88 percent of his first serves.
Although Tsonga's serve weakened in the second set, the Johannesburg champion remained solid, breaking Bolelli twice without allowing any break point.
"Being able to beat Bolelli in one hour shows that I have turned a corner and that I can keep on aiming higher,'' Tsonga said.
Llodra ousted fellow Frenchman Paul-Henri Mathieu 6-3, 7-6 (1) to take on Mikhail Youzhny of Russia.
Llodra won the first five points in the tiebreak.
Djokovic beats Hernych to reach Open 13 quarters
Iker Casillas Equals Real Madrid Goalkeeping Record
Djokovic beats Hernych to reach Open 13 quarters