Jordanian Prime Minister Adnan Badran's surprise visit on Saturday is the first at this level by a Jordanian official since the US-led invasion in 2003.
Badran is leading a high government delegation including Foreign Minister Farouk al-Kasrawi.
The visit comes just weeks after the Iraqi government had accused Amman of hosting people involved in "terrorist acts" in Iraq as well as Saddam Hussein's family that is allegedly trying to revive Saddam's banned Baath Party.
Jordan is a major port of entry for masses of goods and people into Iraq, which had been Amman's primary source of oil, but relations have occasionally been strained since the US invasion.
During a joint news conference with al-Jaafari, Badran said the two governments needed to focus on improving security along their border.
He also discussed the establishment of a railway line linking Jordan's Red Sea port of Aqaba to Baghdad.
"Half of the time, the port of Aqaba works for Iraq," he said.
He said Jordan's Karamah border crossing with Iraq was being upgraded to handle the massive increase in road traffic between the two countries.
Joint security committee
"A joint security committee comprising the Jordanian interior minister and the Iraqi interior minister will be formed to study all joint security issues," Badran said.
"This visit demonstrates our desire to improve Iraqi-Jordanian relations"
Iraqi prime minister
"The security in Iraq is important for ... the security and stability of Jordan."
Al-Jaafari called on all Arab governments to follow Jordan's example in establishing close relations with Baghdad.
"This visit demonstrates our desire to improve Iraqi-Jordanian relations," he said.
Jordan withdrew its ambassador to Iraq shortly before the 2003 US-led invasion.
But Amman maintained its embassy in Baghdad, headed by a charge d'affaires whose two-year term is drawing to an end.
In August 2003, an attacker detonated a car bomb outside the Jordanian embassy in Baghdad, killing 19 people including some Jordanians visiting the mission.
Last month, Jordan nominated an ambassador to Baghdad, and Iraq has accepted the nominee. Jordan has delayed sending its new envoy until the Iraqi capital is more secure.