Mr Spielberg's decision is a high-profile blow to Olympic organisers
The foreign ministry said "ulterior motives" may be behind criticism of its links with Sudan.
The director said his conscience would not allow him to continue in his role.
China has strong economic and military ties with Sudan, which campaigners say it should use to put pressure on Khartoum to resolve the Darfur crisis.
A UK newspaper has published a letter from 80 Nobel laureates and artists urging Beijing to help end the conflict.
'Empty rhetoric'
Chinese foreign ministry spokesman Liu Jianchao said: "We have taken notice that recently there have been many controversies and actions involving China and Darfur.
"It is understandable if some people do not understand the Chinese government policy on Darfur, but I am afraid that some people may have ulterior motives, and this we cannot accept," he told a news conference.
"China is also concerned about the humanitarian situation in Darfur. [But] empty rhetoric will not help. We hope that relevant people will be more pragmatic."
OLYMPICS ROW Famous names involved in advising the Olympics include director Zhang Yimou and Kung Fu star Jackie Chan Hollywood stars Mia Farrow and George Clooney have criticised China over Darfur
Athletes put focus on Darfur Spielberg action: China reacts China's dilemma over Darfur
Beijing says it has appointed a special envoy to Darfur and sent peacekeepers to the region. But many, including Steven Spielberg, say that is not enough.
At least 200,000 people have died and two million forced from their homes in the five-year conflict in Sudan's Darfur region, where pro-government militia are accused of widespread atrocities.
Sudan denies backing the Janjaweed militia and says the suffering in Darfur has been exaggerated.
Sudan sells some two-thirds of its oil to Beijing, while Beijing sells weapons to the Sudanese government and has blocked efforts to pressure Khartoum in the UN Security Council.
Campaigners say arms sold by China to the Sudanese government that have been used in Darfur.
'Ongoing failure'
Mr Spielberg's announcement late on Tuesday is Beijing's first big setback in staging the Olympics, analysts say.
The renowned director, who had been brought in as artistic adviser for the opening and closing ceremonies of the Games, said his conscience would not allow him to continue in the role.
HAVE YOUR SAY The real question is why the Olympics were awarded to China in the first place Vladi, California
"Sudan's government bears the bulk of the responsibility for these ongoing crimes, but the international community, and particularly China, should be doing more," he said.
Adding to the pressure, British newspaper the Independent has published on its front page the full text of a letter signed by 80 Nobel laureates, politicians and artists to Chinese President Hu Jintao urging greater action on Darfur.
Signatories include South Africa's Archbishop Desmond Tutu, US former Senator Bill Frist and British playwright Tom Stoppard, as well as a host of former Olympians.
The letter, released by campaigning group Crisis Action on 12 February, said China had both the opportunity and the responsibility to help bring peace to the troubled region.
"Ongoing failure to rise to this responsibility amounts, in our view, to support for a government that continues to carry out atrocities against its own people," the letter said.
Steven Spielberg in 1999.
Beijing National Stadium, where the opening ceremonies will take place.
On Wednesday, United States film director Steven Spielberg withdrew from his position as artistic adviser to the 2008 Summer Olympics in Beijing, China. "Conscience will not allow me to continue with business as usual," he said.

"Sudan's government bears the bulk of the responsibility for these ongoing crimes but the international community, and particularly China, should be doing more to end the continuing human suffering there," Spielberg's statement said. "China's economic, military and diplomatic ties to the government of Sudan continue to provide it with the opportunity and obligation to press for change."

China immediately expressed regret over his decision and suggested that "ulterior motives" may be at play. "It is understandable if some people do not understand the Chinese government policy on Darfur, but I am afraid that some people may have ulterior motives, and this we cannot accept. ... China is also concerned about the humanitarian situation in Darfur. But empty rhetoric will not help. We hope that relevant people will be more pragmatic," said Liu Jianchao, the Deputy-Director General of the Information Department in China's foreign ministry.

Following Spielberg's withdrawal, other organizations called for boycott of the Games. However, United Kingdom Minister for the Olympics Tessa Jowell rejected such calls. "The world has known for the last seven years that Beijing would host the Olympics," Jowell told ''The Times''. "Most progressive governments accept that there are wholly unacceptable aspects of Chinese policy, but that did not stop the International Olympic Committee awarding them the games. A call for a boycott doesn't serve any purpose and it would be a great pity. This doesn't mean, however, we should be distracted from the urgency of Darfur."

"China is also concerned about the humanitarian issues there, but we have been playing a positive and constructive role in promoting peace in Darfur," Liu said, adding that China is working with the United Nations to provide aid and resolve the crisis.

Critics of China contend that China supports the Islamic regime in Sudan because it buys two-thirds of the country's oil exports and also sells it weapons. Further, China has been defending the government in Khartoum in the United Nations Security Council. Since 2003, fighting between government-backed militia and rebels in Darfur has led to the death of more than 200,000 people and displaced some 2.5 million others.

Meanwhile, United States President George W. Bush confirmed that he still plans to attend the Games in Beijing. "I view the Olympics as a sporting event. On the other hand, I have a different platform to Steven Spielberg, so I get to talk to Hu Jintao President of China and I do remind him he can do more to relieve the suffering in Darfur."

Bush followed this by saying: "I’m not going to use the Olympics as an opportunity to express my opinions to the Chinese people in a public way because I do it all the time with the president."