A male and a female soldier were found dead at an army post after failing to answer calls early on Saturday.
A third Israeli soldier and the alleged attacker – described as an Egyptian policeman – were later killed during a search operation.
The incident happened just hours after a drug smuggling operation had been thwarted at the border.
An Israeli military spokesman, Col Richard Hecht, said drugs worth 1.6m shekels ($400,000) had been seized after someone used a ladder to cross the fence.
He said that this was assumed to be connected to the later shootings.
An army statement said: “An investigation is conducted in full cooperation with the Egyptian army.”
Later, the Egyptian army said that a member of its security forces has been killed during the operation against smugglers, but did not say that he was the gunman.