The attack added to a long history of daring jailbreaks in the strife-torn south, home to a decades-old Muslim separatist insurgency as well as extremist gangs that have recently declared allegiance to the Islamic State group.
A two-hour long firefight broke out when more than 100 armed men believed to have been led by a local Muslim rebel commander attacked the jail in Kidapawan city at about 1:00am, jail authorities said.
"It's to rescue their comrades under our custody. It is a rescue operation," jail warden Peter John Bonggat told local ABS-CBN television.
Bonggat said the attackers were believed to be a breakaway faction of the Moro Islamic Liberation Front (MILF), the nation's largest Muslim rebel organisation that is in peace talks with the government.
At least 158 prisoners had escaped, Bonggat told AFP, although it was unclear how many of those were linked to the attackers or were just other inmates who took advantage of the chaos.
"The (inmates) took chances because of the volume of fire... they used their bedding, piled them on top of each other to escape," Bonggat said.
Bonggat said the jail, which housed 1,511 inmates, lacked guards and was a dilapidated former school building located in a forested, secluded area.
Three inmates facing charges of illegal possession of explosives and drugs escaped from the jail last year.
Kidapawan, 950 kilometres (590 miles) south of Manila, is home to various Muslim rebel groups, criminal gangs and communist insurgents.
"We have many Muslim personalities (in the jail) that are members of various organised, syndicated groups," Bonggat told AFP.
Security forces pursued the assailants and the escapees throughout Wednesday morning, with local authorities reporting up to six had been killed in the hunt.
MILF spokesman Von al-Haq told AFP the group did not know who the attackers were and was contacting its members to get more information.
The MILF has about 10,000 armed followers, but they have been observing a ceasefire with the government as part of the peace efforts.
The southern region of Mindanao is the ancestral homeland of the Muslim minority in the largely Catholic Philippines.
More than 120,000 people have been killed in the rebellion.
While the MILF is aiming for peace, there are various breakaway groups that are determined to continue fighting and have declared allegiance to the IS group.
The Maute group, regarded as one of the most dangerous extremist organisations, freed 23 inmates in a jailbreak last year in a nearby city.