West Bank national security chief, General Haj Ismail Jabir, resigned on Thursday after an angry Abbas sought his dismissal.
Abbas, also known as Abu Mazin, sacked Yunis al-Has, national security chief for Ram Allah, where the armed men went on the rampage on Wednesday night, highlighting persistent lawlessness in the occupied territories, officials said.
"Abbas was not happy with the performance of some of the heads of security forces," a Palestinian official said. "He was very upset about what happened in Ram Allah and he will take other crucial measures in the near future."
Earlier it emerged that West Bank intelligence chief Tawfik Tirawi had offered to resign over the shooting.
"He tendered his resignation last night but Abu Mazin has not accepted it yet," an official said.
"He did this because of the corruption and the shooting against the president's office which the security forces have done nothing about," he said.
Late on Wednesday, a group of armed men from a militant group loosely affiliated to the dominant Fatah faction opened fire inside Abbas's Ram Allah headquarters, prompting the Palestinian leader to order a crackdown in a bid to stem the growing security chaos.
"Abbas was not happy with the performance of some of the heads of security forces"
Senior Palestinian official
The men fired a volley of bullets into the air inside the courtyard of the Muqataa headquarters after being ordered out of the compound where they had been living for months.
In the wake of the shooting, which spread into the city but caused no casualties, Abbas has ordered his troops to "suppress any attempt to harm citizens or their property" and instructed the relevant services to compensate Palestinians who suffered damage in attacks.