This was the highest number of Palestinians killed in a single day since May, when an unofficial ceasefire ended the worst bout of violence in years between Israel and Hamas, the Islamic militant group that rules Gaza.
Lt. Col Jonathan Conricus, an Israeli military spokesman, called it a "very significant attempt to attack Israel."
"We hold Hamas responsible and accountable for any acts of violence emanating from the Gaza Strip whether they were Hamas operatives or not," Mr Conricus said at a briefing with reporters.
No Palestinian groups claimed responsibility.
Hamas, in a statement denying its involvement, stressed that it was an "individual act by angry youths."
"The occupation is responsible for the state of anger and pressure inflicted on our people due to the continued siege on Gaza," said Abdel-Latif al-Qanou, a Hamas spokesman.
Mr Conricus said the four were armed with automatic rifles, hand grenades and rocket propelled grenade launchers.
He said Israeli soldiers opened fire when the militants tried to climb the fence, and that the militants returned fire before being killed. No Israelis soldiers were hurt.
Early in August, Israeli troops shot and killed a Palestinian militant who opened fire at forces behind the fence. Three soldiers sustained light to moderate wounds.
The Gaza-Israel frontier has remained tense despite the ceasefire.
Hamas has staged weekly demonstrations along the boundary since March 2018 to protest against the strip's dire conditions following 12 years of Israeli-Egyptian blockade.
The militant group cancelled this Friday's protest because of the upcoming Muslim holiday of Eid al-Adha.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies