Khalil al-Dimyati, 32, and Yusef Abu Abed, 22, were killed after two "resistance tunnels" collapsed, Hamas said, referring to tunnels used for military purposes.
It did not give details of the locations or causes of the collapses, but confirmed the two men were members of Hamas's armed wing.
A security source said one collapse was in Gaza City, while the other was near the city of Khan Yunis.
Hamas has run Gaza for a decade and fought three wars with Israel, which maintains a crippling blockade of the territory.
Also Read
During the last round of conflict in 2014 attack tunnels were one of Hamas's most effective weapons.
Other tunnels are used for smuggling from Egypt, although many have been destroyed by the Egyptian authorities in recent years.
Several dozen Hamas members have died in tunnel collapses in the past year.
Disclaimer: No Business Standard Journalist was involved in creation of this content