The senior military commander in the area, Lieutenant-General Roy Cimatu, said the 23 hostages had been released in two batches.
Assistant Interior Secretary Abraham Iribani told Reuters news agency that after hours of negotiations it had been agreed all the hostages would be released during Tuesday night.
The rebels had earlier threatened to kill their captives, unless government forces gave them safe passage.
The hostages were taken by followers of outgoing renegade governor Nur Misuari as they fled from military air strikes against their base in a government complex.
Mr Misuari began an uprising last week, ahead of a vote to elect a new governor for the Autonomous Region in Muslim Mindanao (ARMM).
More than 100 people died in attacks on army outposts by rebels supporting Mr Misuari on the island of Jolo.
Despite the violence, voting went ahead on Monday amid tight security, and there were few reports of trouble.
But on Tuesday morning, air force bombers and helicopters targeted the rebels - said to number about 100 - who had refused leave the office complex in a Zamboanga suburb.
An army spokesman said 25 insurgents, a soldier, and at least one civilian were killed in the air strikes.
Human shields
As they tried to escape the bombardment, rebels snatched local residents from their homes, tied them up and used them as human shields and marched them through the city.
The rebels then took over a small public hall, from where they have been negotiating with the authorities.
The gunmen belong to the Muslim separatist Moro National Liberation Front (MNLF) - led by Mr Misuari until he was dropped by the group's political leadership earlier this year.
The MNLF fought a long secessionist war, spanning three decades, until a peace agreement signed in 1996 set up the ARMM with Mr Misuari as governor.
The BBC's John McLean in Manila says the MNLF is sticking to the peace agreement, and Mr Misuari commands the loyalty of only a small faction.
Our correspondent in Zamboanga says Mr Misuari lost a lot of support due to his poor performance as governor.
Allegations of incompetence and corruption led the Philippines government to back alternative candidates within the MNLF.
After the failure of his uprising, Mr Misuari fled to Malaysia, where he was arrested on Saturday.