"Two assailants infiltrated the community of Eli, south of Nablus. They attacked a man outside his home," the army said in a statement.
"Forces arrived... (and) shot the attackers resulting in their death."
A settler was wounded trying to stop them before the soldiers arrived, an army spokesman said.
A wave of violence in Israel and the Palestinian territories since early October has killed 180 Palestinians as well as 28 Israelis, an American, a Sudanese and an Eritrean, according to an AFP toll.
Others were shot dead by Israeli forces during clashes or demonstrations.
