No other people were injured, a police spokesman said.
The attacker, who carried a rifle or "long gun", acted alone and appeared to be a "disturbed man", the interior minister of Hesse state, Peter Beuth, told the regional parliament.
Police have not identified the man or established his motive, spokesman Bernd Hochstaedter said, adding that nothing immediately pointed to him having a militant background.
German television showed pictures of heavily-armed police, wearing helmets and body armour, storming the Kinopolis complex in Viernheim, south of Frankfurt, and a couple fleeing the building.
Cinema employee Guri Blakaj told Reuters the gunman, who was aged about 18 to 25 and about 1.7 metres tall, entered the cinema at around 3 p.m. and told workers to go into an office.
He then went into a cinema theatre. Blakaj, who said there were about six staff and 30 cinemagoers in the building, then heard shots fired.
Police special forces stormed the building and shot the gunman.
[. . .]
Some 300 police officers and special forces were involved in the operation.
Gunman takes hostages in German cinema, is shot dead by police
By Ralf Banser
June 23, 2016
* * *
The gunman barricaded himself inside the cinema.
Guri Blakaj initially dismissed the masked man who stormed the Kinopolis cinema complex in Viernheim, Western Germany, at about 3pm on Thursday carrying a gun and ammunition belt.
He believed the man he saw standing 'by the popcorn stand' to be a customer wearing a costume, complete with the belt of cartridges draped across his shoulder.
But then Blakaj, who was working the till at the time, realised it was 'something more serious'.
As his colleagues were told to lie down, Blakaj was ordered to close the doors to the cinema.
All the while, the gunman held his weapon to his head.
Blakaj, who was told to go and sit in his office after shutting the doors, said the man also shot at a colleague but didn't hit him.
'He seemed very confused, and was relatively young,' Blakaj said, adding he had asked if the man wanted money, to which he responded he didn't.
The assailant then went into one of the theatres. Blakaj, who said there were about six workers and 30 cinema-goers in the building, then heard shots fired. Other reports suggest there were about four shots fired in total.
Almir H., 16, said he was one of the hostages taken by the man in the cinema. He claimed he was locked in a toilet and said, in broken German: 'Lie down in here if you love your life.'
Police special forces later stormed the building and shot him the masked man.
Bild newspaper reported that a suicide vest and a hand grenade were found near the body of the dead man, although police have not confirmed this. Authorities have said, however, that the man was mentally disturbed and not linked with any terrorist group.
'I saw German cinema shooter at the popcorn counter but thought he was a fan in costume until he opened fire': Witness describes terrifying ordeal after gunman let off tear gas and took hostages
Masked gunman opened fire at the Kinopolis cinema complex
Suspect was seen entering the cinema wearing a mask and munition belt
As people ran screaming he unleashed tear gas
Police received call saying there was a man 'armed with a long gun'
The cinema is located in the town of Viernheim, in Western Germany
By FLORA DRURY and SARAH DEAN FOR MAILONLINE and ALLAN HALL IN BERLINJune 23, 2016