Jordan is a leading member of the US-led coalition fighting the Islamic State group in neighbouring Iraq and Syria and has been the target of jihadist attacks in the past.
"The intelligence agency office in the Baqaa camp was the target of a cowardly attack shortly before 7:00 am (0400 GMT) today that left five agents dead," government spokesman Mohammed Momani said.
Momani said security forces were investigating who was responsible for the "terrorist attack" on the first day of the Muslim holy month of Ramadan.
A security source told AFP that preliminary findings suggested the attack was carried out by a lone gunman who opened fire with an automatic weapon before escaping.
The source said it was unclear whether the gunman was a camp resident or an outsider.
Jordan has seen spillover from the conflicts in Iraq and Syria in the past.
In December 2005, suicide attacks on three Amman hotels claimed by IS's predecessor Al-Qaeda in Iraq killed 60 people and wounded dozens.
The Baqaa camp, where Monday's attack took place, is 20 kilometres (12 miles) from the centre of Amman and the largest of the kingdom's 10 official Palestinian refugee camps.
Signup to our newsletter and follow us on Facebook and Twitter!
It hosts around 100,000 of Jordan's 2 million Palestinian refugees, most of whom fled from the West Bank and Gaza Strip after Israel's capture of the territory's during the Six-Day War of 1967.
Baqaa suffers from chronic poverty and high unemployment.
It was the home of Mahmud Abdelal, an Islamist extremist who blew himself up in Syria in October 2012.
In 2010, three Jordanian Islamist extremists were sentenced to prison terms of between three years and life for plotting to kill intelligence officers in the camp, a court official said at the time.
According to sources close to Islamists, almost 4,000 Jordanians have joined jihadist groups in Iraq and Syria, where an estimated 420 have been killed since 2011.
Jordan has carried out air strikes against IS in Syria since 2014.
One of its pilots was captured by the jihadists when his plane went down in Syria in December 2014. In February 2015, IS released gruesome footage of Maaz al-Kassasbeh being burned alive in a cage.
His murder prompted Jordan to extend its air strikes against IS to Iraq, where it is the only Arab coalition member participating in the bombing campaign.
Jordan has also opened up the Prince Hassan airbase, northeast of the capital, to other members of the US-led coalition taking part in the air war.
In March, Jordanian authorities announced they had foiled an IS plot to carry out attacks in the kingdom in an operation that led to the deaths of seven jihadists.