Police say Brig. Gen. Abdul-Hussein al-Kadhoumi was driving a civilian car through al-Andalus square early Monday when he was cut off by two cars and sprayed with bullets.
Police say the officer was on his way from his home in western Baghdad to the downtown traffic headquarters when he was killed.
The police spoke on condition of anonymity because they were not authorized to speak to the press.
On Sunday, the convoy of the traffic department's director general was attacked with a roadside bomb. Maj. Gen. Jaafar Toma escaped that attack unharmed.
Iraq's security forces are often targeted by militants.