It was not immediately clear who was running the government. Tanks rolled through the streets and hundreds of soldiers with riot shields surrounded the presidential palace in the capital, Tegucigalpa. The constitution mandates that the head of Congress is next in line to the presidency, followed by the chief justice of the Supreme Court.
The Supreme Court said it supported the military action, which it said was aimed at defending the constitution.
But Zelaya, arriving at the airport in the Costa Rican capital, San Jose, called the military action illegal.
"There is no way to justify an interruption of democracy, a coup d'etat," he said in a telephone call to the Venezuela-based Telesur television network. "This kidnapping is an extortion of the Honduran democratic system."
Zelaya said he would not recognize any de facto government and pledged to serve out his term, which ends in January.
President Barack Obama said he was "deeply concerned" by Zelaya's expulsion and U.S. Secretary of State Hillary Clinton said the arrest should be condemned.
"I call on all political and social actors in Honduras to respect democratic norms, the rule of law and the tenets of the Inter-American Democratic Charter," Obama's statement read.
Soldiers took Zelaya into custody at his house outside the capital while he was in his pajamas, he told a Costa Rican television station. A police officer outside the house, who would not identify himself by name, said soldiers disarmed Zelaya's security guards without any injuries.
Zelaya ally Rafael Alegria, a labor leader, told Honduran radio Cadena de Noticias that shots were fired during the president's arrest, "but we really don't know much about what happened."
About 100 Zelaya supporters, many wearing "Yes" T-shirts for the referendum, blocked the main street outside the gates to the palace, throwing rocks and insults at soldiers and shouting "Traitors! Traitors!"
Honduras has a history of military coups: Soldiers overthrew elected presidents in 1963 and 1972. The military did not turn the government over to civilians until 1981, under U.S. pressure.