There were no indications that a perpetrator was on the run, a police spokesperson said, declining to say how many people were dead.
The Bild newspaper reported that seven people were dead and eight others injured in the shooting.
"Several people were seriously injured, some even fatally. We are on site with a large contingent of forces," said Hamburg police on Twitter.
Comment:
Broadcaster NDR quoted a police spokesperson saying that one or several unknown perpetrators shot at people in a church at about 9 p.m. local time (2000 GMT).
"The dead people all have gunshot wounds," the spokesperson was quoted as saying.
Germany's DPA news agency, citing a reporter on the scene, said that local residents in the northern Alsterdorf district of Hamburg had received warnings on their mobile phones of a "life threatening situation" and that streets had been sealed off.
Television footage showed dozens of police cars as well as fire engines blocking off streets as sirens blared.
"We're all up and running, there is even a helicopter deployed," said a police spokesperson.
The mayor of Hamburg, home to Germany's biggest port, expressed shock.
"I extend my deepest sympathy to the families of the victims. The forces are working at full speed to pursue the perpetrators and clarify the background," tweeted Peter Tschentscher.
But OTOH Hamburg is known for a large red light scene, including the collateral "trades" - drug trade and human trafficking. With gangs of different nationalities.