Zverev struggled against the array of deft drop shots that Dzumhur used to drag the German into the net, where he was less effective, after the first set, but he eventually prevailed 6-2, 3-6, 4-6, 7-6 (3), 7-5 on Court Philippe Chatrier.
Bosnia's Dzumhur, seeded 26th, had a match point on Zverev's serve at 5-4 in the final set. Having never played a five-set match at Roland Garros until this year, Zverev has now won two back-to-back.
Said Zverev, when asked what was going through his mind about playing another five-setter: "Mainly, I was thinking [about] what I was going to have for lunch."
Dzumhur had just held serve at the start of the fourth set when he and the ball boy ran into each other as they were both looking skyward to catch a ball. For a few anxious moments, the boy seemed hurt, lying on the red dirt. But he then picked himself up with Dzumhur's help.
Zverev, ranked third, has never been seeded as high as No. 2 at a major before. It is the first time since the 2006 Australian Open that someone other than Nadal, Roger Federer, Novak Djokovic and Andy Murray has been among the top two seeded players at a major.
Fourth-seeded Grigor Dimitrov fell to 0-7 against top-50 opponents at the French Open and still has never made it to the fourth round at the clay-court Grand Slam tournament.
Dimitrov, a two-time major semifinalist, bowed out 7-6 (4), 6-2, 6-4 in the third round against Fernando Verdasco, who is ranked 35th and seeded 30th.
In his previous match, Dimitrov had come back after trailing two sets to one and defeated Jared Donaldson 10-8 in the fifth set. That 4-hour, 19-minute victory might have taken something out of Dimitrov, who fell to 0-15 when trailing by two sets in a match at a major.
"I definitely need to take some time off now to reassess the whole clay-court season, to be honest," Dimitrov said after the match. "That's going to be the No. 1 priority for me now to kind of step out from the tennis for a little bit, try to watch some matches and try to progress somehow and just get better."
Verdasco, meanwhile, got to the fourth round at Roland Garros for the seventh time. He has lost at that stage on all six previous chances to reach the quarterfinals.
According to ESPN Stats & Information, the last No. 2 seed that failed to reach the second week at the French Open was Andy Roddick in 2005.
The 19th-seeded Nishikori, who broke Simon's serve five times and saved all six break points on his own serve, will next play either seventh-seeded Dominic Thiem -- a semifinalist at Roland Garros the past two years -- or unseeded Italian Matteo Berrettini.
Nishikori has twice reached the quarterfinals at Roland Garros, including last year.
Thiem, who has reached the semifinals at Roland Garros the past two years, dropped his serve twice, but had seven aces and broke Berrettini's delivery six times.
Lucas Pouille and Karen Khachanov were in the third set on center court when their third-round match was halted because of rain. On nearby Suzanne Lenglen Court, eighth-seeded David Goffin was midway through the third set against No. 32 Gael Monfils.
Both matches will be completed Saturday.
The Associated Press contributed to this report.