A man opened fire at about 04:30 (01:30 GMT) on Sunday, killing one person. The gunman was then shot and injured by police, and died later in hospital.
The attack unfolded at the Grey club in an industrial part of the city, on Max-Stromeyer-Strasse.
Police have ruled out a terrorist motive in the shooting.
The gunman was a 34-year-old Iraqi citizen, but not an asylum seeker, a police spokesperson told broadcaster N-TV. He is believed to have lived in Germany for a long time.
Multiple German news outlets said the second person killed was a guest at the club.
Others were able to save themselves by fleeing outside or hiding, police said.
A doorman appeared to have been shot with an automatic weapon as he tried to stop the attacker, witnesses told broadcaster SWR.
One police officer was also wounded in the exchange of fire. The officer's injuries are not thought to be life-threatening.
Police and prosecutors said in a statement (in German) that special commando forces and a police helicopter had been deployed, as it was not yet known if the suspect had accomplices.
The motive for the shooting remains unclear.
Commandos and a police helicopter have been deployed in the area