"At 4:30 pm (2000 IST) on October 2, the death penalty was carried out against Hani Mohammed Abu Aliyan from Khan Yunis for his crime of killing Hazem Hassan Barham," the ministry said in a statement.
"The Khan Yunis court (in the north of Gaza) sentenced the aforementioned for the crimes he committed (which included the murder and illegal possession of a knife) to death by hanging".
The Palestinian territory's appeals court had rejected challenges against the sentence, said the ministry.
Rights groups had called for Hamas to halt Abu Aliyan's execution, as well as that of another prisoner who was sentenced in March for "collaboration" with Israel.