The talks came a day after Jan Egeland, a top UN envoy, protested over what he called a Sudanese government decision to bar him from visiting Darfur and Khartoum this week.
Egeland, the UN undersecretary-general for Humanitarian Affairs and Emergency Relief, said the government was trying to prevent him from seeing the deteriorating situation in the war-torn region.
The West Darfur state government acknowledged not allowing his flight to land, though the central government denied barring him.
Mubarak and Omar al-Bashir, the Sudanese president, held talks on Tuesday on developments in the situation in Darfur, Sudan's state news agency reported.
Ahmed Aboul Gheit, the Egyptian foreign minister, told reporters in Khartoum that the two leaders were pursuing "efforts to achieve peace agreement that provides stability and development to the people of Sudan and especially the people of Darfur".
Asked about sending Arab troops to Darfur, Aboul Gheit said this should be "within the framework of a peace agreement to be reached between the Sudanese government and the other parties of the conflict".
Mubarak has not visited Sudan since the 1995 assassination attempt on his life in Addis Ababa, Ethiopia, which senior Sudanese officials were thought to have been behind.
Hassan Turabi, the Sudanese opposition leader, said earlier last month that some of those who planned the Addis Ababa assassination plot were still serving in the current Sudanese government.
Omar al-Bashir raised the issue
of Darfur in the talks
The Egyptian leader did not attend a summit meeting of the Arab League held in Khartoum last week, saying he was busy with domestic issues.
The summit largely lent its support to Sudan, saying that UN peacekeepers should not be deployed in Darfur without the Khartoum government's permission.
The Arab leaders promised to help fund African Union peacekeepers in the region and increase the number of Arab soldiers in the force.
In their talks, Mubarak assured al-Bashir of Egypt's commitment to Sudan's "security and stability".
The Egyptian leader also called for an international effort to improve the situation in southern Sudan in the wake of a powersharing deal between Khartoum and former southern rebels, Egypt's state news agency MENA quoted Suleiman Awwad, a presidential spokesman, as saying.
After several hours of talks, Mubarak flew out of Khartoum, MENA said.
The United Nations has described Darfur as the site of the world's gravest humanitarian crisis.
The 3-year-old conflict setting the Arab-dominated government and militias against ethnic African tribes has left some 180,000 dead - most from disease and hunger - and displaced another 2 million from their homes.
Sudan's government and rebels in Darfur have made little headway in peace talks in Abuja, Nigeria.