The ministry said four were killed in one location, where the Israeli military said it opened fire on a crowed of Palestinians who breached the fence and approached an army post. No Israeli troops were harmed, the army added.
Two other Palestinians were killed in other protest locations, the ministry said, adding that at least 140 Palestinians were wounded by live bullets.
The Israeli military said 14,000 Palestinians thronged the border fence areas, burning tires and throwing rocks, firebombs and grenades at soldiers stationed atop earth mounds on the other side of the barrier.
Since March, Hamas has orchestrated near-weekly protests along the fence, pressing for an end to a stifling Israel-Egyptian blockade imposed since the militant group wrested control of Gaza in 2007.
Hamas' chief, Ismail Haniyeh, who attended a protest in east Gaza City, said that "the determination of the Palestinian people will break the siege."
More than 150 Palestinians participating in or present at the marches have been killed since they began. In May, about 60 protesters were killed in a single day, making it one of the deadliest since a 2014 war between the two sides.
The blockade has restricted Hamas' ability to govern and plagued most of Gaza's 2 million residents. Electricity is supplied for roughly four hours a day, unemployment stands at more than 50 percent and tap water is unpotable.
Repeated attempts to reconcile Hamas and the West Bank-based administration of Palestinian President Mahmoud Abbas have all but faltered, increasing the desperation that has in large part fueled the demonstrations.
This week, the United Nations began supervising deliveries of Qatari-donated diesel fuel meant to restart Gaza's only power plant to increase electricity supplies and mitigate the crisis. The station has yet to operate.
Hamas seeks a cease-fire with Israel securing an easing of the blockade but accuses its rivals in the West Bank of thwarting the effort. In recent weeks, it has stepped up its campaign, holding nighttime protests and adding new locations such as along the beach. Hamas says the escalation of protests is a response to the unresolved cease-fire talks.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.