Army chief Gen Romeo Vasquez said he could not break the law
The Honduran president has sacked the armed forces chief after he refused to give logistical support for a referendum on constitutional change.
President Manuel Zelaya wants to hold a vote on a new constitution that could allow him to seek a second term.
A decision in Congress this week seemed to have halted the referendum, which the courts have also deemed unlawful.
But Mr Zelaya has indicated that the process of consultation will begin on Sunday as planned.
"I have decided to remove the head of the joint chiefs, General Romeo Vazquez Velasquez," President Zelaya said in a televised address on Wednesday.
He said he had also accepted the resignation of his defence minister, Edmundo Orellana.
Mr Zelaya said his decision stemmed from "a crisis caused by some sectors that have promoted destabilisation and chaos".
The president wants to hold a referendum this Sunday to ask Hondurans if they approve of holding a vote on constitutional change at the same time as the presidential election in November.
On Tuesday, the Honduran Congress passed a law that appeared to block these plans. The new bill prevents the holding of referendums or plebiscites 180 days before or after general elections.
Army chief Gen Romeo Vasquez said he could not help to organise the referendum, as he would be breaking the law.
The Spanish news agency, Efe, quoted him as saying that as a professional soldier he accepted the president's decision to replace him.
President Zelaya was elected in 2006 and under the current constitution is barred from standing for re-election.