In a statement sent to Aljazeera, Hamas said it executed the man for providing information that helped Israel to assassinate the group's founder and nine others.
Hasan Muhammad Musallam, in his 20s, had been missing from his home for several days.
He was shot dead two days after Israel assassinated the deputy chief of Hamas' military wing, Adnan al-Ghul, in an air strike. Al-Ghul had been on Israel's most-wanted list since 1990.
Hamas spokesman Mushir al-Masri said the killing of the suspected informer was meant as a warning to others.
Those who come forward and repent during the current month of Ramadan would not be harmed physically, al-Masri was quoted as saying.
The Hamas military wing, Izz al-Din al-Qassam Brigades, said Musallam was interrogated and "provided us with information and details about the way he assisted the Zionist enemy in carrying out the crimes of assassination".
Shin Bet network
Israel's Shin Bet security agency runs a large network of informers in the West Bank and Gaza Strip, ensuring collaboration through blackmail, offers of entry permits to Israel and money.
Israel killed Yasin and successor
al-Ranitisi (L) earlier this year
Israel also tracks fugitives with unmanned surveillance aircraft or drones and hi-tech spy balloons.
Since the outbreak of Israeli-Palestinian fighting in 2000, Israel has killed dozens of Palestinian resistance fighters in targeted attacks, including Hamas spiritual leader Shaikh Ahmad Yasin in April and his successor, Abd al-Aziz al-Rantisi, a month later.
Hamas said on Saturday it was collecting information on suspected collaborators and would eventually track them down.
While Palestinian resistance fighters have killed dozens of alleged informers in the West Bank, such attacks have been rare in the Gaza Strip where the Palestinian security services still function to some degree.
Saturday's killing marked just the second time since 2000 that alleged informers have been attacked in Gaza. In August, Hamas and Islamic Jihad members killed three suspected informers, one in a Gaza City jail and two in their hospital beds.