“The world is watching. The use of chemical weapons is and would be totally unacceptable,” said Mr Obama.
A Syrian official has insisted it would “never, under any circumstances” use such weapons, “if such weapons exist”.
Meanwhile, the United Nations says it is pulling “all non-essential international staff” out of Syria.
As many as 25 out of 100 international staff could leave this week, the UN news agency Irin reported, while all humanitarian missions outside Damascus will be halted for the time being.
‘World is watching’
In a speech on nuclear non-proliferation at the National Defense University in Fort McNair, Mr Obama said: “We’ve worked to keep weapons from spreading, whether it was nuclear material in Libya or nor chemical weapons in Syria.
“We simply cannot allow the 21st century to be darkened by the worse weapons of the 20th century.”
“And today I want to make it absolutely clear to Assad and anyone who is under his command… If you make the tragic mistake of using these weapons there will be consequences and you will be held accountable.”
But Damascus rejected allegations it was preparing to use such weapons.
A foreign ministry spokesman was quoted by state television as saying: “Syria confirms repeatedly it will never, under any circumstances, use chemical weapons against its own people, if such weapons exist.”
Syria is believed to hold chemical weapons – including mustard gas and sarin, a highly toxic nerve agent – at dozens of sites around the country.
The CIA has said those weapons “can be delivered by aircraft, ballistic missile, and artillery rockets”.
One unnamed US official spoke to the New York Times of “potential chemical weapon preparation”.
The White House says the level of concern was such that Washington is preparing contingency plans.
EU Damascus pull-out
The crisis in Syria had increased the risk of humanitarian workers in the country due to the increased risk of indiscriminate shooting by fighting forces., said Sabir Mughal, the UN’s chief security adviser in Syria.
The European Union, which has a diplomatic office in the Syrian capital, has confirmed it too is “to reduce activities in Damascus to a minimum level due to the current security conditions”.
Earlier, Egypt Air ordered the return of a flight on its way to Damascus amid reports of a “bad security situation” around the airport – only a day after ending its suspension of flights following violence around the airport and in the capital’s suburbs last week.
Syrian Foreign Ministry spokesman Jihad Makdissi is reported to have already left the country, even before reports that he had been dismissed, ostensibly for making statements out of line with government policy.
Rebels have been making gains on the ground, and the head of the Arab League has said the Syrian government could fall at any moment, the BBC’s Jim Muir reports from Beirut.
But it still holds the capital, parts of the second city Aleppo, and other centres and one diplomat said it still has a lot of fight left in it.
Intelligence that the Syrian government was contemplating the use of the missiles is what led neighbouring Turkey to request Nato Patriot missile defences along its borders, Turkish officials were quoted as saying on Sunday.
Several Syrian mortar shells – aimed at rebel targets close to the border – have landed in Turkish territory in recent weeks, leading Ankara to ask Nato for the deployment of the sophisticated anti-missile batteries.
But Russian President Vladimir Putin, after talks with Turkish Prime Minister Recep Tayyip Erdogan in Istanbul on Monday, warned against such a move, fearing it would “exacerbate” rather than “defuse” tensions on the border.
Moscow has remained a key ally of Syria during the 22-month conflict, while Ankara now backs the rebels trying to oust President Assad.
There was no breakthrough on how to “regulate the situation” in Syria, said Mr Putin, while emphasising that the Turkish and Russian “assessment of the situation completely coincides”.
“We are not advocates of the incumbent Syrian leadership,” he said.