UN Secretary-General Ban Ki-moon urged the two sides to return to negotiations "immediately" as their envoys traded barbs at the UN headquarters.
But the differing versions over the fate of the oil town -- which the South's troops entered 10 days ago -- underscored the heightened antagonism between the two sides.
Sudan's UN Ambassador Daffa-Alla Elhag Ali Osman said the South's troops had been hunted out. "They have been cornered, we fought against them and we chased them out. It is not a withdrawal, we ran them out," the envoy told reporters.
"An orderly withdrawal will be completed within the next three days or 72 hours," South Sudan's UN Ambassador Agnes Oswaha countered, reaffirming an announcement by President Salva Kiir.
She said "journalists and international monitors are highly welcomed" to go to Heglig to see who is in control.
Osman said "We will not aggress and cross the international border. We hope that they learned their lesson and do not repeat such an aggression."
But he kept up the Khartoum government's barrage of criticism of the South, which broke away from Sudan in July last year.
"The government of today in the South is different from the people of South Sudan. They behave with the mentality of guerrillas, because they were leaders of rebel movements and when they got independence they continued to behave with the mentality of guerrillas," the envoy said.
South Sudan broke away from the north following a referendum under a 2005 peace deal that ended a two-decade civil war in which more than two million people died.
The South's ambassador said Heglig, which the South calls Panthou, remains South Sudanese territory and the dispute must be decided by international arbitration along with "other contested areas along the shared border."
"Instability could reoccur" if international action for a full solution to territorial disputes is not carried out, she said.
South Sudan decided to withdraw from Heglig "because it does not wish to see a return to war and seeks an immediate resumption of negotiations between the two parties," Oswaha said.
Salva Kiir was ready to go to a neutral location for a summit with the north's President Omar al-Bashirm, the envoy said.
The UN leader "takes note" of South Sudan's announcement that it will pull out of Heglig, said UN deputy spokesman Eduardo del Buey.
Ban urged both governments "to resume negotiations immediately" under a mediation effort led by African Union envoy Thabo Mbeki, the former South African president.
The UN chief "reiterates his call on the government of Sudan to stop the bombing of South Sudanese territory and urges both governments to cease their support to each other's rebel groups," said the spokesman.