In 1886, a young Emilio Aguinaldo, Jorge Estregan, and his best friend Candido Tirona, Sid Lucero, receive cryptic prophecies from an old woman; Aguinaldo learns of his rise to power and eventual downfall, while Tirona learns of his death.
Ten years later, Aguinaldo, now the gobernadorcillo of Cavite El Viejo, is secretly inducted into the Katipunan by its leader Andrés Bonifacio, Cesar Montano and assumes leadership of its Cavite chapter. When trouble breaks out in Manila in late August, the Philippine Revolution starts and Aguinaldo secretly mobilizes his army despite the lack of weapons. Learning that the Spaniards have deployed most of their forces in and around Manila, Aguinaldo leads his army and defeats the Spanish troops in a series of battles that liberate Cavite from Spanish hands, but at great cost as Tirona is killed in action, as the old woman predicted.
As the Katipunan gains ground in Cavite and the nearby provinces, its Magdalo and Magdiwang factions convene at Tejeros to create a revolutionary government that will unify the divided revolutionaries. The ensuing election ends with Aguinaldo elected as president, John Arcilla as Mariano Trías, and Bonifacio himself as interior minister. Bonifacio later storms out of the convention after Daniel Tirona objects to his position. Meanwhile, as Aguinaldo and his forces fight the Spaniards at Pasong Santol, he receives news of his victory at the convention from his brother. Aguinaldo leaves his men under his brother's command while he attends his inauguration. Aguinaldo eventually hears of his brother's death and his army's defeats. Aguinaldo also learns that an embittered Bonifacio has established his own government in Naic since no one in the Katipunan recognizes him as leader anymore. Bonifacio is soon arrested by Aguinaldo's supporters who accuse him of sedition during his trial. Unwilling to fracture the Katipunan any further as it will jeopardize their unity against the Spaniards, Aguinaldo orders Bonifacio simply be exiled but the war council secretly orders Bonifacio's execution.
Several months later, the war's tide is turned when Cavite is retaken by the Spaniards. Aguinaldo, with most of his forces, retreats to Biak-na-Bato in Bulacan where he creates a new revolutionary government and negotiates with the Spaniards to end the conflict and peacefully secure the country's independence; in exchange, however, Aguinaldo and his followers have to go to Hong Kong. In there, Aguinaldo meets with U.S. officials who offer him support. As the Spanish–American War takes place, Aguinaldo returns to the Philippines and defeats the Spaniards, finally winning the country's freedom. The First Philippine Republic is then formed in Malolos while the diplomat Alvin Anson as Felipe Agoncillo tries to represent the newly formed nation at the Paris peace negotiations between Spain and the U.S.
The peace treaty eventually ends with Spain secretly selling the Philippines to the U.S. for $20,000,000 in order to evade humiliation. This results in a brutal war with the Americans in February of the following year. Antonio Luna, Christopher De Leon as a short-tempered general, is appointed commander of the army. However, because of his brash and ruthless nature, Luna is brutally murdered by disgruntled troops and the Filipino forces are easily routed by the Americans. As a result, Aguinaldo flees to Northern Luzon. American forces quickly catch up and a young general Gregorio del Pilar holds them off at Tirad Pass, allowing Aguinaldo to continue his escape. Two years later, in Palanan, Isabela, Aguinaldo's loyal courier is captured by the Americans while getting some medicine for his sick son. After learning from him of Aguinaldo's whereabouts, American forces under Frederick Funston and their Kapampangan scouts capture Aguinaldo. The war ends in American victory and, as the old woman predicted, Aguinaldo laments his downfall.
After he formally acknowledges the American occupation of the Philippines, Aguinaldo lives a quiet life in the passing decades during which his wife Cristine Reyes Hilaria dies of illness. He later marries Agoncillo's niece Maria, tries to run as President again but is defeated in the presidential elections, collaborates with the Japanese, and witnesses the restoration of full independence, where he is overjoyed when its date was moved to June 12th. As an elderly Aguinaldo suffers a series of strokes that affect his health, the old woman who gave him his prophecy appears to him at his deathbed one more time and reveals herself as Inang Bayan, before she transitions to her younger self. The film ends when we see Aguinaldo and Inang Bayan at the river, as Aguinaldo waves the Philippine flag for the final time.