The country's Humanitarian Affairs Commission said the programme directors of Save the Children UK and Oxfam International had violated the law on non-intervention in the country's political, ethnic or sectarian issues.
"It has been decided to consider you persona non grata for the management of your organisation in Sudan," the acting commissioner, Abd al-Khaliq al-Husain, said in letters addressed to the local directors of the aid organisations.
"Therefore, you must leave the country within 48 hours."
The ministry of humanitarian affairs, which supervises the commission, said it was responding to statements on this month's upsurge in violence in Darfur, in the western region of Sudan.
A rebellion in Dafur has provoked a counter-insurgency campaign that has killed thousands of people and displaced about 1.5 million inhabitants.
"The Ministry of Humanitarian Affairs views the statements issued by those two organisations as sending signals of support to the outlaws and rebels for continuation of the war," the ministry said in a press release.
An Oxfam spokeswoman in the UK confirmed the expulsion.
"Oxfam can confirm reports that their country programme manager for North Sudan has been asked to leave the country. We are seeking further clarification on this matter," Amy Barry said.
In Khartoum, the Save the Children country director refused to comment.
The government referred to two press releases by Oxfam - one on 19 November that condemned a UN Security Council resolution for its weakness on Darfur, and another on 22 November that called on the European Union to exert pressure on Sudan to stop the violence.
"The Ministry of Humanitarian Affairs views the statements issued by those two organisations as sending signals of support to the outlaws and rebels for continuation of the war"
Statement by Sudan's Humanitarian Affairs Commission
"Rejecting the resolutions of the UN Security Council that calls for peace realisation in Sudan simply means that organisation wants the continuation of war in Darfur," the ministry said.
It also said that calling for EU pressure on Sudan was sending signals to the rebels to continue war.
The ministry criticised a 21 November press release by Save the Children UK that accused the government of bombing a site in the North Darfur town of Tawilla.
It said the aid group's report of both sides breaking the cease-fire did not distinguish between the rebels and the police who were protecting civilians.
In a 22 November statement, Save the Children had accused both sides of "utter disregard" for the ceasefire, saying innocent people were suffering "at the hands of the rebels and their own government".
The ministry said the organisations should have contacted the government about these matters.
Darfur rebels have been accused
of violating ceasefires
"We would like to stress our rejection of any handling of security matters through the media," the ministry said.
The government has a history of tension with aid groups, which have previously accused Khartoum of unnecessarily restricting access to the displaced people in Darfur.
The government argued it was denying access for security reasons.
Although the rebellion began in Darfur in February 2003, the government did not ease restrictions on aid groups until May 2004, as the world condemned the suffering of hundreds of thousands of homeless people without adequate supplies of food and medicine.