The Israeli army said troops early on Monday saw three Palestinians crawling near the Gaza border fence, one carrying a bag.
Suspecting it contained explosives, the soldiers shot at the Palestinians after they failed to heed calls to stop.
It was unknown whether the men were armed at the time of the shooting. Palestinians later found and brought their bodies to a Palestinian hospital, paramedics said.
Elsewhere in Gaza, two armed men and a Palestinian security officer were wounded in a gunfight in Gaza City in the latest internal violence that has increased in Gaza since Israel's pullout last month.
Witnesses said the clash erupted when bodyguards of a Palestinian security official tried to stop a car carrying armed men from the Popular Resistance Committees.
When they refused to pull over, the security officers opened fire at the armed men, sparking a gunfight, which intensified when members of the faction and more security forces came to reinforce their comrades.
One fighter was arrested, a security source said.