The 37-year-old struck a parked patrol car with a bat in the city of Gelsenkirchen on Sunday and threatened two officers standing by the vehicle with a knife, local police said in a statement.
One of the officers fired his gun four times, killing the assailant. Investigators are still looking into reports that the man shouted “Allahu Akbar” (God is greater) during the assault.
While police so far cannot definitively rule out an extremist link, a search of the man's home has “not confirmed initial suspicions of a terrorist motive”.
Investigators also have evidence that the attacker suffered from “a psychological illness” and was known to police for previous acts of violence including against law enforcement officials.
The inquiry is ongoing, the statement added.
Germany remains on alert following a series of Islamist attacks, the deadliest of which was a truck rampage at a Berlin Christmas market in 2016 that killed 12 people.
Dozens of suspects have been arrested or charged over alleged terror plots
in recent years.