The Israeli military said it launched a strike on a field near Bait Lahiya in the Jabalya refugee camp on Sunday at fighters attempting to fire rockets.
The killing of the Hamas fighters was the first by Israel since the Islamic resistance movement formally scrapped a 16-month truce with Israel on Friday and resumed firing rockets and mortar bombs from Gaza.
Three other Hamas fighters were wounded in the air strike.
Security sources named one of the dead men as Salem al-Arabiya, who was a local commander of the Hamas' armed wing, Ezzedine al-Qassam Brigades.
Hamas said it ended the truce in response to the recent killing of seven people on a Gaza beach during Israeli shelling.
Hamas had abstained from striking inside Israel since a truce was announced in early 2005. It had spearheaded a suicide bombing campaign since a Palestinian uprising began in 2000.
But Israeli officials have said Hamas has been helping other resistance factions to carry out daily rocket launchings from Gaza, territory that Israel quit last year.
Earlier on Sunday, an Israeli was wounded in the southern town of Sderot by an exploding rocket fired by Palestinian fighters from the Gaza Strip, according to military sources.
The male victim of the attack was said to be in a serious but non-life threatening condition and was being operated on in hospital.
A second rocket exploded in the industrial zone of the nearby port city of Ashkelon but without causing any casualties, the sources added.
Responsibility for the attacks was claimed by a series of Palestinian armed factions, including Hamas, with the Ezzedine al-Qassam Brigades saying in a statement that it had fired a total of nine rockets towards southern Israel, including Sderot and Ashkelon.
On Saturday, the Israeli defence minister hinted that Israel might renew its assassination policy against Hamas leaders - even those in government - after the group ended its ceasefire.
Asked by reporters at a base in southern Israel about targeting Hamas officials, Amir Peretz said: "We will definitely act against any organisation or element that is planning operations.
"No one has an insurance policy. No one endangering Israelis can turn his name or title into an insurance policy."