After Japanese third seed Jun Mizutani had tumbled out of the Olympics 4-0 in the tournament's biggest upset to date against Denmark's Michael Maze, Zhang stood on the precipice of a shock demise.
The world champion, world number one and hot favourite emerged to fight another day, however, after a seven-game thriller against Belarus's Vladimir Samsonov, who had not been expected to ruffle his feathers.
The pressure of representing table tennis-mad China looked to have taken its toll as he trailed his opponent 3-2 in games and then went toe-to-toe in a decider before eventually edging the encounter to set up a clash against Hong Kong's Jiang Tianyi.
"I was prepared for a very tough match and even to fall behind," he said following his 4-11 11-7 11-5 8-11 8-11 11-7 11-7 win.
"I was a little bit nervous. At 2-3 down I thought I was just going to go for it and if I lose it just doesn't matter.
"The pressure is very high out there. Samsonov made me feel uncomfortable."
Maze, who moved into the quarters in a 4-0 romp, said he could sense the pressure building under the Chinese players before the tournament began.
"It's not so easy in the Olympic Games for the Chinese. They come to the world championships with seven players and here they only have two.
"Obviously they are very nervous, they have huge pressure while the people from Europe can just relax and play free.
"I had the feeling from the beginning that it wouldn't be a Chinese winner. They have everything to lose and nothing to win."
Maze's passage into the quarters was not only a rip-roaring display but also the culmination of a lengthy struggle to return from two operations to repair damaged cartilage in his right knee.
"It was two years in hell and I am just happy to be back now," he said.
Mizutani was among the medal favourites, but he was out-fought by the Dane who exploded a flurry of winners that blew his opponent off court in just 35 minutes.
"I was quite surprised at just how well I played," he said. I am especially happy about the way I kept my focus and hopefully I can continue tomorrow.
"I am in my best shape ever. I had a bit of luck today but I played good as well."
Next up for Maze is Germany's Dimitrij Ovtcharov in an all-European quarter-final that guarantees at least one non-Asian will reach the final four.
Europe's highest ranked player, Timo Boll, however, tumbled out of the competition, losing his fourth round match to Romania's Adrian Crisan 4-1.
China's second seed Wang Hao was spared the torturous workout that his team mate had to endure and comfortably booked his place in the quarters with a 4-1 win over Gao Ning of Singapore.
- Related links