The 41-year-old man had previously been sentenced in 2008 to a jail term for planning an attack against former Iraqi prime minister Iyad Allawi, a prosecution spokesman told AFP.
In the incident Thursday, four police cars were called to the western Berlin district of Spandau when the man was reported acting aggressively toward passers-by, police said.
When a policewoman approached him, he stabbed her with a knife, leaving her badly wounded before her colleagues opened fire, killing the Iraqi man.
National news agency DPA said the man had removed an electronic ankle monitor he had been ordered to wear.
More From This Section
In the 2008 court case, Rafik Mohamad Yousef was one of three Iraqi men sentenced to jail terms.
The three were convicted of belonging to a foreign terrorist organisation -- Iraqi militant group Ansar al-Islam -- and attempted conspiracy to commit murder.
The court found that their plot to assassinate Allawi had been hatched only days before his brief trip to Berlin in December 2004.