Egypt's President Mohammed Mursi appointed a new national intelligence chief and sacked the governor of the north Sinai region after gunmen killed 16 border guards there.
Mr Mursi vowed to restore security in Sinai after the incident on Sunday.
Officials blamed the attack on Islamist militants who have stepped up attacks on security forces since the overthrow of his predecessor Hosni Mubarak last year.
A spokesman said the president had also asked the head of Egypt's armed forces, Field Marshal Hussein Tantawi, to name a new head of military police, and named a new head of the presidential guard.
It was unclear how far Mr Mursi had taken the decisions in consultation with the army, which has kept a tight grip on security policy since the overthrow of Mubarak.
But he made the changes after holding a national security meeting that brought together Mr Tantawi as well as the prime minister and interior minister.
Explaining the changes, the spokesman said Egypt was going through a critical phase and it was necessary to protect "the Egyptian revolution and the Egyptian will".
Earlier, Egyptian troops and air force jets killed 20 suspected militants in the Sinai region bordering Israel.
The air strikes around the town of Sheikh Zuwaid, 10km from Palestinian-ruled Gaza Strip, followed clashes overnight between armed men and security forces at several checkpoints in the region.
Israel said Egypt's action against the militants was a necessary response against groups threatening its security.
The government in Cairo said the gunmen behind Sunday's attack had reached Egypt via tunnels. It began work to seal off the tunnels yesterday.
Israel has long accused Palestinian militants of crossing from Gaza to Egypt to team up with local militants with the aim of attacking Israel's long border.
Eight Israelis have been killed in border attacks in the past year.
In al-Arish, residents took to the streets overnight to demand better protection from the government and arms to defend themselves after the attacks on checkpoints.
Security forces closed al-Arish's main highway shortly after the start of the military operation. Power, Internet and mobile phone networks in the area were shut down.
Hamas condemned Sunday's attack and said it was trying to help Egypt identify the gunmen.