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.
Nadal continued his preparations for the Paris Olympics by coming from a set down to reach the final of the Swedish Open on Sunday.
The Spaniard will either play Thiago Agustin Tirante or Nuno Borges before travelling to France to try and claim a third gold medal at the games.
Nadal's last tour-level final came at Roland Garros two years ago, where this year's tennis will be taking place during the Paris Olympics.
Nadal's semi-final test came just a day after a gruelling four-hour win over Mariano Navone, the second-longest three-set match of his career.
The Spaniard was able to complete the victory in just two hours and 12 minutes, but insisted that Ajdukovic posed a difficult opponent on Centre Court.
“I think it was a tough match," Nadal said in his on-court interview. "My opponent had one of the best backhands that I played against.
"He came here with a lot of confidence. I think I was trying to push him back.
"It was very, very difficult, honestly, but I found a way to survive and be through to that final after a long time without being in a final. So that’s great news and I’m very happy with that.”
Nadal continues his Olympic Games preparation later on Saturday, with a doubles semi-final clash against Orlando Luz and Rafael Matos, alongside partner Casper Ruud.