The man, who was not identified, snatched a gun from a guard and wounded the guard, then killed the investigative officer during the interrogation in the officer's Interior Ministry office, the ministry said in a Web site statement Saturday.
The incident occurred while the man was being questioned about the Sunday attacks in downtown Baghdad that killed 155 people, the worst in Iraq in two years, the ministry said.
The government statement did not say when the shootings occurred, but said the man also was wounded and later died at a hospital.
A man who identified himself as the cousin of the slain investigative officer told The Associated Press that the shooting happened Thursday but that he knew few details. He said he did not want to be identified, fearing retribution for speaking publicly about the issue.
Al Qaeda's umbrella group in Iraq has claimed responsibility for Sunday's bombings. Iraq's prime minister blamed the bloodshed on Baathists, who are supporters of former dictator Saddam Hussein, and on Al Qaeda.
The bombings raised the specter of possible new sectarian tensions in Iraq. Sunni Iraqis sometimes feel government ministries, including Interior, are too quick to blame them for attacks carried out by extremists.
The blasts in the heart of the capital infuriated Iraqis, who question how the bombers could have driven their deadly cargo undetected through the multiple checkpoints that dot Baghdad.
Prime Minister Nouri al-Maliki's government, facing a January election, has been under intense pressure to show that the Iraqi military and police are able to handle security as U.S. troops slowly withdraw.