A ministry statement said security forces were carrying out a raid on the group's apartment in Assiut when a firefight ensued in which all six militants were killed. It did not say when the incident took place.
The apartment was "an organizational base where (the group) was preparing to carry out a series of terrorist operations in the provinces," the statement said.
Egypt faces an Islamist insurgency led by the Islamic State group in the Sinai Peninsula, where hundreds of soldiers and police have been killed since 2013.
But Islamic State has also intensified attacks in the mainland in recent months, often targeting minority Coptic Christians.
Egypt on Friday saw one of the worst attacks on its security forces in years when 23 soldiers were killed after two suicide car bombs were detonated in North Sinai.