The government appoints the mufti but he says he is independent
Muslims should not use weapons of mass destruction and possess them only as a deterrent, a top Islamic cleric says.
Grand Mufti of Egypt Ali Gomaa said using such weapons would violate Islamic teachings as Muslims as well as non-Muslims could be killed.
He issued the religious ruling, or fatwa, following reports that the use of such weapons was legitimate, the state news agency Mena said.
His ruling comes just days before the visit of US President Barack Obama.
Mr Obama, who arrives on 4 June, is expected to give a speech on US relations with the Muslim world.
On a recent visit to Turkey he said the US was not at war with Islam and called for a greater partnership with the Muslim world.
Cairo has said it does not want to make atomic bombs and in the past has called for a region free of nuclear weapons.
Correspondents say that is a reference to Israel - the only Middle Eastern power suspected of possessing such an arsenal.
Pakistan is the only Muslim country known to have nuclear weapons, although Western powers and Israel suspect Iran of trying to develop an atomic bomb.
The grand mufti, who is state-appointed, said it was also not allowed for Muslims to kill civilians even during a declared war.