This is the latest bloodshed in what has become the deadliest year in the territory since 2015.
Palestinian extremist groups claimed the men who were killed in the city of Jenin were members of their organisations.
However, there were conflicting statements about the circumstances surrounding the death of hospital doctor Dr Abdullah Al Ahmed.
The Palestinian Health Ministry said he was on duty, attending to the wounded outside his hospital, when he was fatally shot.
But the Al Aqsa Martyrs Brigades, an armed offshoot of the secular Fatah party, claimed Al Ahmed was a member of the group.
In a poster announcing his death, it said he died “in an armed clash” with Israeli forces “defending the homeland”. The poster appeared to show the doctor posing with two assault rifles.
The official Palestinian news agency, Wafa, identified the other man killed in the Jenin refugee camp on Friday as Mateen Dabaya, 20.
The extremist group Islamic Jihad said he was a field commander.
The camp is a stronghold of Islamic Jihad, a Fatah rival, and has been a frequent flash point for confrontations.
Crowds of mourners gathered for the separate funerals of the two men, whose bodies were carried through the streets.
Five people were wounded in the fighting, including two paramedics, as an ambulance was caught in the crossfire, the official Palestinian news agency, Wafa, reported.
Video showed an ambulance trapped in a narrow alley of the camp trying to retrieve a body as gunshots rang out.
The Israeli army said it entered Jenin on Friday to arrest a wanted Hamas militant in connection with recent attacks against Israeli security forces.
Diaa Muhammad Yusef Salama, 24, was armed with an M16 rifle when he and two other suspects were apprehended by security forces, according to the Israeli army.
The confrontation sparked a gun battle between Israeli soldiers and armed Palestinians.
Photos showed smoke billowing from the camp after extremists apparently detonated explosives.
The Israeli army claimed it opened fire on armed men and warned bystanders that they were risking their lives by being in the area.
At one point, a firefight erupted outside the local hospital, witnesses said.
Al Ahmed, who worked in the licensing department, was shot in the head as he left the building to tend to a wounded man in the hospital yard, according to hospital director Wisam Bakr.
Mr Bakr said he knew nothing about claims that the doctor belonged to Al Aqsa Martyrs Brigades.
Nabil Abu Rudeineh, a spokesman for Palestinian President Mahmoud Abbas, condemned Friday’s shootings as “extrajudicial killings”.
“The Israeli government has crossed all the red lines,” he said.
More than 120 Palestinians have been killed in fighting between Palestinians and Israelis in the West Bank and occupied East Jerusalem this year — making 2022 the deadliest year since 2015.
The fighting has surged since a series of Palestinian attacks in the spring killed 19 people in Israel.
Israel says most of the Palestinians killed have been militants. But youths throwing stones in protest at the incursions and Palestinians not involved in confrontations have also been killed.
The raids are needed to dismantle extremist networks at a time when Palestinian security forces are unable or unwilling to do so, Israel claims.
Palestinians say the raids undermine their security forces and are aimed at cementing Israel’s 55-year occupation of their lands.
Hundreds of Palestinians have been rounded up in the raids, with many placed in so-called administrative detention, which allows Israel to hold them without trial or charge.
Tensions had spilt over into East Jerusalem earlier this week, as Israeli police fired live rounds, tear gas and stun grenades on Palestinians throwing stones and fireworks across several neighbourhoods.
Two Israelis were hurt in the confrontations, Israeli police said on Friday, adding that security forces arrested 18 suspects on charges of disturbing public order.
Police said they have scaled up their presence at flashpoint areas across the city.
Tensions in East Jerusalem have soared since a Palestinian shot and killed an Israeli soldier at a checkpoint at the entrance to the Shuafat refugee camp, last Saturday.
A second soldier was killed near Nablus, in the northern West Bank, on Tuesday.
Late on Thursday, the extremist far-right Israeli lawmaker Itamar Ben Gvir visited Sheikh Jarrah, a neighbourhood that has become a focal point of heightened tensions between Israelis and Palestinians in East Jerusalem.
“Friends, if they throw rocks, shoot them!” he said in a widely shared video as he brandished a pistol, apparently addressing Israeli settlers confronting Palestinian protesters.
Meanwhile, movement in and out of Shuafat has been restricted as troops search for the gunman in last Saturday's shooting.
— With reporting from AP and AFP.