President Benigno Aquino and the leader of the Moro Islamic Liberation Front, Al Haj Ebrahim Murad, put their signatures to the document in a ceremony at Manila's Malacañang palace.
The signing was witnessed by Malaysian Prime Minister Najib Razak and more than 1,000 other invitees.
"I will not let peace be snatched from my people again," Aquino said, adding that he hoped Philippine lawmakers would approve the laws needed to implement the pact, which calls for the creation of a Muslim autonomous area in the southern part of the archipelago.
The exact borders of the new region, to be known as the Bangsamoro, will be decided by a referendum in the Muslim-populated areas.
Bangsamoro denotes Muslim and other non-Christian natives of southern Mindanao island.
"The comprehensive agreement on the Bangsamoro is the crowning glory of our struggle," Murad said Thursday.
Under the agreement, the Bangsamoro Transition Authority is supposed to be installed sometime next year ahead of elections set for 2016.
The Moro Islamic Liberation Front, or MILF, originated in 1984 as a more-militant faction of the Moro National Liberation Front.
The older organisation, known as the MNLF, reached agreement with the government in 1996 on the formation of the autonomous region in Muslim Mindanao, which is now to become a part of Bangsamoro.
Murad on Thursday extended an invitation to the MNLF to join the process, but it remains unclear how the rival Moro group will respond.
More than 50 people died last September during an MNLF assault on the mainly Christian city of Zamboanga, Mindanao.
As many as 150,000 people have died in the struggle between the Muslims and the Philippine central government.