The man, whose name was not given, first used an unidentified object to attack a police car in front of a precinct in Gelsenkirchen Sunday night, and then approached officers with the item in his hand, police spokesman Christopher Grauwinkel said.
As the man came toward the officers, they saw that he had a knife in his other hand and did not stop despite several orders to do so. A 27-year-old police officer then fatally shot him, dpa said.
Local media reported that the man shouted "Allahu Akbar," or "God is great" in Arabic, as he moved toward police. Dpa said the attacker was a Turkish citizen and that it is not known if he also had a German passport.
Police on Monday called on possible witnesses to come forward if they had seen the incident. The prosecutor's office in nearby Essen said it could not immediately comment.
Germany's security services have reviewed domestic and international threat levels following the killing of Iranian Gen. Qassem Soleimani in Iraq last week.
The Interior Ministry confirmed a media report Saturday that revised guidance has been circulated to police in Germany's 16 states so they can take "appropriate security measures" to protect American and Jewish facilities.
The ministry provided no details on the guidance disseminated by the Federal Police Office.
On Friday, a knife attack in Paris left one man dead and two women injured. French prosecutors said the incident is being treated as terror-related after investigations revealed that the assailant, who was shot dead by police, had been radicalized and had prepared the attack.