Israeli army sources said troops saw two "suspect silhouettes" on Saturday morning in a prohibited area approaching the security fence near the Karni crossing dividing Gaza from Israel and opened fire, hitting them both.
The army later called for Palestinian ambulances to remove the bodies of the pair, a Palestinian source said.
The military wing of Hamas resistance group and another small armed movement affiliated with Palestinian President Yasir Arafat's Fatah faction said in a statement that the two men were on an "operation" to avenge Palestinian deaths in an Israeli invasion last Sunday.
On Sunday, armoured Israeli forces raided the Nusairat and al-Buraij refugee camps, igniting gunbattles that killed 14
Israeli military sources said the Palestinian fighters were carrying rifles, ammunition belts, grenades and a pipe bomb.
They said they were shot and killed as they crawled towards the fence near Nahal Oz, a crossing into Israel in northern Gaza.
The two men were identified as Muhammad Habush, 20, of Hamas and Said Mraish, 20, from a small Gaza armed group called the Ahmad Abu al-Rish Brigades.
Palestinian resistance fighters have repeatedly approached the Gaza fence to clash with soldiers, attempt to cross into Israel and occasionally to observe and gather information on activity at military posts for future attacks.
The killings came hours after senior US envoys held talks with Israel and the Palestinians on possible peace moves.
The deaths bring to 3830 the number of peopled killed since the September 2000 outbreak of al-Aqsa Intifada, or uprising against Israeli occupation, including 2876 Palestinians and 886 Israelis.