A disaster agency worker said two of those killed were students, while several others were receiving treatment at a hospital.
Four of the eight injured students, all aged 14 to 17, were in critical condition, the worker said.
The suspected gunman reportedly shot himself following the attack, South Cotabo provincial governor Reynaldo Tamoyo said.
The town mayor later reported that the attacker had died, according to the Reuters news agency.
However, authorities had not immediately established how many shooters were involved in the attack.
In a video circulating on social media, a teacher was heard saying there were two shooters, while a student could be heard saying “they” were outsiders to the school.
“For now, we are trying to let our fellow citizens know that the situation is stable and the case is contained,” Tamayo said.
“We never thought this would happen.”
Meanwhile, the incident came weeks after nationwide shooter drills were conducted to strengthen school security following two earlier school shootings in the country in recent months.
The latest attack also came a month after a shooting at Ateneo de Zamboanga University in the southern Philippines left two students dead, including the student gunman, on Aug. 18.
Authorities have yet to disclose a possible motive for the latest shooting.