Militants attacked a border guard checkpoint west of the Mediterranean town of Rafah, bordering the Gaza Strip.
The military says at least five soldiers, including an officer, were killed in the attack. At least seven militants were also killed, it said.
It was the second militant attack in less than a week.
Last Saturday, at least 11 soldiers were killed in one of the deadliest attacks on Egyptian security forces in recent years.
The Islamic State group also claimed responsibility for the attack, which took place in the town of Kantara in Ismailia province, extending east from the Suez Canal.
Egypt is battling an uprising in the Sinai that has intensified since the military ousted an elected but divided Islamist president in 2013. Extremists have carried out a number of attacks, mainly targeting security forces and Christians, but the pace has slowed in recent years.