Speaking against a backdrop of rising anti-American sentiment, she said "sweeping", or searching the country for foreigners with the aim of driving them out of the country, was tarnishing Indonesia's image.
She said that, in accordance with eastern values, foreigners should be respected as guests of the nation.
In the first sign of a harder government line, a senior official told the Jakarta Post newspaper any Indonesians who travelled to Afghanistan to join a jihad or holy war could lose their citizenship.
Muhamad Indra, a director at the immigration office, said allowing Indonesians to enter Afghanistan and join military groups to fight the US would be tantamount to declaring war on the US.
Hundreds of volunteers
He said immigration offices would be ordered not to issue travel documents for such purposes.
The Islamic Youth Movement (GPI) says it has registered hundreds of jihad volunteers in Jakarta alone.
GPI chairman M Iqbal Siregar told the Jakarta Post the number could reach several thousand if volunteers from elsewhere in Indonesia were included.
The US has warned its citizens not to travel to Indonesia and last week authorised non-essential embassy staff to leave Jakarta if they wished.
Ambassador threatened
The move came folllowing daily anti-US demonstrations in Jakarta, and, in one of the main cities on the central island of Java, an incident last week in which Muslim extremists searched hotels for American guests.
No foreigners have so far been reported harmed but the life of US ambassador Robert Gelbard has been threatened.
Last week, Mr Gelbard criticised police for not acting against the threats. Jakarta's police chief said they were powerless because nobody had yet broken the law.
President Megawati was the first Muslim leader to visit Washington in the aftermath of the attacks there and on New York.
Indonesia, which is the world's largest Muslim nation, is seen as vital member of US President George W Bush's global coalition against terrorism.