About 300 Abu Sayyaf fighters retreated after the hour-long firefight in the jungles of the remote southern island of Jolo, said Brigadier-General Alan Arrojado, the military commander in the area.
However the military did not say if any of the hostages were freed or injured in the clashes, or how many hostage were believed to have been held at the rebel camp.
Ten Philippine soldiers were wounded in the fighting, Arrojado added.
Last week two Philippine coast guard men, who were among 11 hostages held by Abu Sayyaf, escaped during fierce clashes which erupted after elite military forces launched a risky rescue operation, leaving 15 Abu Sayyaf men dead on Jolo.
Also Read
The militants have since split into smaller groups, each holding some hostages, Bulao added.
The military rescue attempt came after the decapitated remains of a 12th hostage, Rodolfo Boligao, were found on a deserted Jolo highway.
The group engages in kidnappings to finance operations, often targeting foreigners and sometimes beheading captives if ransoms are not paid.
It has also been blamed for the worst bomb attacks in the country, including the firebombing of a ferry off Manila Bay in 2004 that killed more than 100 people.