Three others were injured by the armed attackers in the al-Baladiya district in the Iraqi capital's southeast on Monday.
Dalil al-Qasus, the Palestinian ambassador in Baghdad, told Aljazeera: "The incident comes in the context of the deteriorating security situation in Iraq.
"A group of unidentified armed forces have stormed the Palestinian residential compound in al-Baladiya district, opening fire at civilian residents."
Al-Qasus appealed to the Iraqi government to protect Palestinians living in Iraq.
Many Palestinians have left Iraq and moved to Syria since the fall of Saddam Hussein.
In al-Iskandiriya, 40km south of Baghdad, two policemen and a civilian were killed when an armed opened fire on their car.
Three people died in separate attacks by armed men on a market in Baquba. A bomb outside a shop killed a policeman who had gone to recover one of the bodies; the blast also wounded five people.
In the north of the country, a security guard was killed and six other people wounded when an armed man shot at their vehicle.
Four more people were killed in three shootings at a market in al-Hawija, west of the northern city of Kirkuk.
Assailants in Baghdad also shot dead a security guard for Adnan al-Dulaimi, a Sunni politician, as he was standing by the road.
In Mosul a policeman was killed and six people, four other officers and two anti-government fighters, injured during clashes. Another policeman and a civilian were wounded when a bomb exploded next to a patrol in the city. In a third incident Iraqi soldier killed three gunmen.
On Sunday, Nuri al-Maliki, the Iraqi prime minister, announced a national reconciliation plan aimed at reducing the sectarian violence in the country.