Egypt's interior ministry said that the two militants killed on Wednesday in the Cairo suburb of Maadi were planning attacks in response to the earlier killing of an Agnad Masr militant group leader by authorities.
The ministry said that the militants were planning to target several public figures, including politicians, and army and police members.
The police said in an official statement that the two "terrorist members" were involved in several terrorist operations.
The planned attacks were in retaliation for the recent Killing of Agnad Misr leader Ahmed Galal Ahmed Mohamed Ismail.
The circumstances surrounding Ismail's death remain unclear.
Ismail's family says he was arrested at a police checkpoint in Maadi on19 January then forcedly disappearced. His corpse was found with a gun shot in the head earlier this week.
Earlier this week, Egypt's semi-official National Council of Human Rights asked the ministry to investigate the death of Ismail.
Officials say the militants killed in the Maadi raid Wednesday had previously committed deadly acts against security forces including the murder of an army conscript on the Autostrad road in Cairo; the killing of two low ranking policemen in Helwan.
The attacks also included the bombing of a policeman's car also in Helwan; and the assassination of North Sinai's Sheikh Khaled Khalaf El-Menei, who was killed for allegedly collaborating with the security apparatus in the troubled governorate.
Earlier on Wednesday, authorities said that the two men were shot dead by security forces when they fired on police during a raid on a hideout in the Hadaek El-Maadi district in southern Cairo.
Police officials said they had received information that the militants possessed several weapons, including suicide belts and RPGs.
Two policemen were wounded in the gunfight, which lasted six hours.
Authorities announced in recent weeks the killing of several militants during raids on apartments in and outside Cairo.
The banned-Muslim Brotherhood group, whose top leadership are currently jailed and facing trials on criminal charges, has accused authorities of killing unarmed members of the group in various raids.
Agnad Misr, a small Islamist militant group designated by the government as a terrorist group in 2014 - has claimed several deadly attacks against security personnel, mostly in the capital of Cairo, since the 2013 ouster of Islamist president Mohamed Morsi, who hails from the Muslim Brotherhood.
Egypt has been waging a campaign to crack down on an Islamist militant insurgency in North Sinai, led by the ISIS-affiliated Ansar Beit El-Maqdis group which intensified following Morsi's ouster.