The hostage was taken to a hospital after her ordeal, but it wasn't clear if the suspect harmed her or if she was injured when a special police unit stormed the train station pharmacy where she was held to free her.
There were no immediate details on who was taken hostage or how many people were involved.
"Witnesses told us that the attacker said he belonged to the Islamic State group as he was entering the restaurant, but we can not confirm this", Cologne Police Marshal Klaus Rueschenschmidt said during a news conference. The man allegedly demanded the release of a Tunisian woman.
Shortly after, the man took a female hostage at a nearby pharmacy. Police said only that he was injured during the police operation to free the woman. DW's Dana Regev reported that two shots had been fired inside the station.
Klaus-Stephan Becker, head of Cologne criminal police, also told news channel NTV that "it could be a foiled terrorist attack".
Syrian identity documents had been found in the pharmacy for a man who had been issued a residency permit in Germany valid until 2021.
Will you be getting Google's new Pixel 3 phone?
And when Samsung phones get dinged in the press for not matching up to the Pixel, it prods Samsung to follow Google's lead. What colours do the Pixel 3 & Pixel 3 XL come in? These could be the three colour options of the Pixel 3 models.
Trump says 'rogue killers' may be behind Saudi journalist's disappearance
The Washington Post columnist was last seen in public when he entered the Saudi consulate in Istanbul in Turkey on October 2. Hours prior, President Trump announced in a tweet that he spoke with Saudi Arabia's King Salman about Khashoggi.
Freed pastor Brunson leaves Turkey, due in U.S. Saturday
The evangelical pastor was accused of terror-related charges and espionage, facing up to 35 years in prison. Andrew Brunson has been on house arrest since leaving prison due to poor health in July this year.
He said parts of the station, one of the biggest in the country, were closed off as well as Breslauer Platz square behind the station.
A spokeswoman said officers had forced their way into a pharmacy where the suspect was, adding that the hostage-taker's motives were unclear.
German railroad operator Deutsche Bahn said that all train traffic was shut down. It wasn't clear how the injuries were sustained. Ambulances and heavily-armed police were lined up and waiting behind the train station.
Police tweeted that the hostage was slightly injured and was now being treated. He allegedly said during the incident that he was a member of the extremist Islamic State group.
The man was holding a pistol - said to be either a replica or real, when commandos stormed the site, and he was also in possession of a flammable liquid and camping gas containers, two of them taped together.