The incident in the southern city of Assiut occurred a day after Egypt's Cabinet approved a three-month state of emergency in the wake of Islamic State attacks on two Christian Coptic churches that killed at least 44 people.
The seven militants were killed after they opened fire on security forces who approached them as they were meeting to plot further attacks on Christians, the ministry said in a statement. Assiut has a significant Christian population.
Ammunition, weapons, a motorcycle and Islamic State books and publications were found at the scene, the statement said.
Sunday's bombings targeted Coptic churches in Alexandria and Tanta and marked one of the bloodiest days in recent memory for Egypt's Christian minority, the largest in the Middle East.
The Copts, whose presence in Egypt dates to the Roman era, have long complained of religious persecution and accused the state of not doing enough to protect them.