Islamist militants are active in the lawless peninsula, which borders southern Israel, though assaults across that boundary are rare.
The attackers fired guns and an anti-tank missile at the Israelis, the military said in a statement.
“Two soldiers were injured by fire directed at them from Egypt, ” it added, without naming the attackers.
Security concerns and an influx of tens of thousands of African migrants prompted Israel to erect a 250 km (160 mile) long barrier from the Red Sea port of Eilat to the Palestinian Gaza Strip on the Mediterranean. It was completed in 2012.
Earlier that year, attacks by Islamist militants operating from Sinai killed an Israeli soldier and a civilian who was working on the frontier fence.
Israel and Egypt signed a peace treaty in 1979, and Egyptian forces have been trying to curtail Islamist militant operations in Sinai. Wednesday’s attack occurred about half way between Eilat and the Gaza Strip, said the army.
(Writing by Jeffrey Heller; Editing by Andrew Heavens)