The two men were killed in a gunfight when a police team went to arrest them, the officials said.
“The two jihadists belonged to Ajnad Misr (Soldiers of Egypt) and investigations reveal that they could be involved in the bombing of the Italian consulate,” one official said, adding they were also wanted “for their role in assassinating policemen”.
The Islamic State group had claimed the July 11th bombing of the consulate – the first such attack on a foreign mission in Egypt since jihadists launched a campaign against the country's security forces two years ago following a crackdown on Islamists.
A civilian was killed and nine others were wounded in the attack.
Ajnad Misr has previously claimed several deadly attacks in Cairo, particularly targeting policemen, and have planted bombs outside key buildings such as the presidential palace and Cairo University.
In April, the group's leader Hammam Mohamed Attiyah was shot dead in a gunfight with police at a Cairo apartment.
Police say Attiya previously belonged to Ansar Beit al-Maqdis, the Egyptianbranch of the Islamic State group, and that he broke away in 2013 to found Ajnad Misr, a group operating mainly in Cairo.
On July 1st, nine militants, including senior Muslim Brotherhood leader Nasser al-Houfia, were killed in a similar police raid on an apartment in Cairo.
The Muslim Brotherhood said the nine were leaders of the movement, which was designated a “terrorist group” after the military toppled Islamist president Mohamed Morsi in 2013.