The army commander on Basilan Island, the militants' stronghold, blamed al-Qaida-linked Abu Sayyaf rebels for the violence, which came despite efforts by U.S.-trained Philippine forces to put an end to decades of bombings and ransom kidnappings by the extremists in the predominantly Christian nation.
Col. Arthur Ang said the ambush targeted workers from a rubber plantation that refused to pay the militants' extortion demands. The workers were traveling on a truck when the gunmen opened fire, killing five workers and one government militiaman. Twenty-two others were wounded.
The government-armed militia, which provides security for the plantation, repulsed the attackers, Ang said.
The ambush came a day after eight soldiers were wounded when their convoy ran over a homemade bomb in the same area near Sumisip township, said military spokesman Lt. Col. Randolph Cabangbang.
He said troops were sent to guard voters who were registering for next year's elections in an autonomous Muslim region that includes Basilan.
Abu Sayyaf militants have targeted the Basilan rubber plantation previously over ransom demands.
Three militiamen were killed in an ambush in April, and in 2010, the militants abducted and later killed three workers after they failed to collect a ransom.
A decade ago, U.S. troops deployed in the southern Philippines to train Filipino soldiers to battle the Abu Sayyaf amid several high-profile kidnapping sprees and terrorist attacks.
Philippine offensives have weakened the militants but they remain a threat and are still holding at least five foreign hostages, apparently in an attempt to raise funds for food and weapons in their jungle hideouts.
Associated Press writer Hrvoje Hranjski contributed to this report.