Playing his first match since winning the French Open earlier this month, Alcaraz recovered from a second-set slump to win 6-1 7-5.
The Spaniard started strongly in his first meeting with Cerundolo and breezed through the first set, committing just one unforced error.
He quickly found himself 2-5 down after a slow start to the second, but in an impressive turnaround, Alcaraz battled back, winning each of the next five games to ensure he would progress after 82 minutes.
He will meet either Jack Draper or Mariano Navone in the next round.
Data Debrief: Alcaraz makes winning return on grass
Alcaraz did not have it all his own way in London, but he ensured that he extended his winning run on grass to 13 matches.
He saved three set points on his way to levelling things at 5-5 in the second set, giving Cerundolo no way back in.
Zverev needed one hour and 25 minutes on court to beat Martinez 6-2 6-4, ending a run that saw the Spaniard eliminate seeds Matteo Arnaldi and Francisco Cerundolo.
The home favourite earned his first break in the third service game and followed up with another in the seventh, also winning 92% of his first-serve points in the opener as Martinez failed to apply any sustained pressure.
Zverev broke again at the start of the second set before producing crucial holds in the second and seventh games, reaching his third straight clay-court final after also going all the way at the Masters 1000 in Rome and the French Open.
He will face Fils in the showpiece match after the Frenchman overcame Sebastian Baez by a 6-2 6-2 scoreline in just 67 minutes, reaching his first ATP 500 final.
Data Debrief: Zverev eyes Hamburg history
Zverev became just the second German to win the Hamburg title last year after Michael Stich in 1993, and he could now become the first to defend the trophy with Stich falling to Yevgeny Kafelnikov in the 1994 semi-finals.
The reigning champion, who is eyeing a record-breaking 25th major singles title this week, came through a second successive five-set epic to book his place in the last eight at Roland-Garros.
Djokovic finished his third-round clash with Lorenzo Musetti after 3am in the early hours of Sunday morning, and was on Court Philippe-Chatrier over four-and-a-half hours to battle past Cerundolo.
Although, the Serb looked like he could be heading for an early exit when he required treatment for a knee problem in the second set, having dominated the first 6-1.
It certainly affected the three-time champion as he fell two sets to one behind before receiving medication for the issue.
Djokovic dug deep from 4-2 down in the fourth set to force a decider, which he subsequently controlled to scrape over the line a 6-1 5-7 3-6 7-5 6-3 winner.
"For the last couple of weeks, I have had slight discomfort in my right knee, but I haven't had an injury that would concern me at all," he told reporters during his post-match press conference.
"I was playing a few tournaments with it, and had no issues until today. I actually felt great coming into the match - as good as I could under the circumstances - and played really well [in the] first set.
"Then, in the third game of the second set, I slipped, one of the many times that I slipped and fell today. That affected the knee. I started feeling the pain and asked for the physio treatment and the medical timeout, and tried to take care of it.
"It did disrupt me definitely in play. For two sets, two sets and a half, I didn't want to stay in the rally too long. Every time he would make sudden drop shots or change directions, I would not be feeling comfortable doing the running.
"At one point, I didn't know whether I should continue or not with what was happening. I got the medication, and then after the third set was done, I asked for more medication, and I got it.
"I don't know how I won. I don't know what will happen tomorrow or if I'll be able to step out on the court and play. I hope so. Let's see what happens."
Next up for Djokovic is a quarter-final meeting with two-time runner-up Casper Ruud, and what will be a repeat of last year's final.
Earlier on Tuesday, the tournament organisers announced Djokovic would not be continuing his title defence after picking up a knee injury in his incredible comeback win against Francisco Cerundolo on Monday.
His withdrawal also means he has relinquished his world number one ranking, with Jannik Sinner set to take his place in the standings following the end of the tournament.
In a social media post, Djokovic confirmed the news himself.
"I am really sad to announce that I have to withdraw from Roland Garros," his post read.
View this post on Instagram
A post shared by Novak Djokovic (@djokernole)
"I played with my heart and gave my all in yesterday's match and unfortunately, due to a medial meniscus tear in my right knee, my team and I had to make a tough decision after careful consideration and consultation.
"I wish the best of luck to the players competing this week and sincerely thank the incredible fans for all the love and continued support. See you soon."
The 37-year-old now faces a race to be fit for Wimbledon, where he is a seven-time champion, with the tournament beginning on July 1.