The exchange of gunfire occurred near Jenin in the Israeli-occupied West Bank, which has suffered regular bouts of violence this year, at one point leading to a major escalation in the Hamas-controlled Gaza strip which left 44 people dead.
Palestinian official news agency Wafa identified the dead Palestinians as Ahmed Ayman Ibrahim Abed, 23, and Abdul Rahman Hani Subhi Abed, 22.
"An IDF [army] officer was killed overnight during operational activity adjacent to the Gilboa Crossing during an exchange of fire with Palestinian terrorists," an army statement said.
The Palestinian health ministry confirmed "the martyrdom of the two young men" in clashes near the checkpoint north of Jenin known to Palestinians as Jalameh.
Security has been tightened as Israeli football club Maccabi Haifa host French football team Paris Saint-Germain in a Champions League tie later on Wednesday at their base just 60 kilometres from Jenin.
Wednesday's deaths are the latest in a flare-up that began in mid-March.
Palestinian rights groups say more than 100 Palestinians have been killed so far in 2022, in West Bank violence and a brief conflict between Israeli forces and a militia in Gaza, which caused significant damage to the densely populated coastal enclave, home to more than two million Palestinians.
There have been deadly attacks on Israeli targets and in response, Israel has launched almost nightly raids on West Bank towns and cities in which dozens of Palestinians were killed, including fighters.
Last week, armed forces chief Lt Gen Aviv Kohavi said about "1,500 wanted people were arrested and hundreds of attacks prevented" in the operations.
Tensions in Jenin
The Palestinian armed group Hamas lauded the Israeli soldier's death, but neither confirmed that its fighters were involved in the gun battle.
A Hamas spokesperson praised the "heroic operation that was carried out by the resistance fighters".
The Israeli army said the overnight clash came after it had pursued "two suspects" who were spotted "approximately 100 meters" from a security fence.
The Jalameh checkpoint is a major throughfare for goods coming into the West Bank from Israel.
Twelve other Palestinians were arrested in overnight raids across the West Bank, Wafa said.
Jenin local authorities announced a city-wide strike in response to the two deaths, which also sparked a solidarity march for their families.
Israel has occupied the West Bank since 1967, when it captured the territory from Jordan.