Officials said that another seven people were injured on the platform.
Police said a 39-year-old German woman was detained at the station after stabbing people at random on platform 13/14 about 6pm.
The station in downtown Hamburg, Germany's second-biggest city, is a major hub for local, regional and long-distance trains.
Police said a 39-year-old woman was arrested at the scene without putting up resistance and that they believe after watching video footage that she acted alone.
They secured a knife.
There was no immediate indication of any political motive and investigators were looking into whether the suspect may have been mentally ill, police spokesman Florian Abbenseth said.
A high-speed ICE train with its doors open was still at the platform hours after the attack but Abbenseth said that it was not a crime scene.
Railway operator Deutsche Bahn said it was "deeply shocked" by the attack.
Four tracks at the station were closed Friday evening, and some long-distance trains were delayed or diverted.
A ban on carrying knives has been in place at the station since October 2023, with another ban on knives on public transport having taken effect in December 2024.
Chancellor Friedrich Merz's office said the German leader was appalled by the news and told Hamburg mayor Peter Tschentscher in a call on Friday evening that "my thoughts are with the victims and their relatives".
Germany suffered a number of attacks in public places in the run-up to parliamentary elections in February.
with DPA