He continued to serve as the chief adviser for General Aguinaldo after the Philippine Declaration of Independence on June 12. He drafted decrees and edited the constitution for the First Philippine Republic, including the framework of the revolutionary government which was implemented in Malolos in 1899.
Mabini found himself in the center of the most critical period in the new country's history, grappling with problems until then unimagined. Most notable of these were his negotiations with Americans, which began on March 6, 1899. The United States and the Philippine Republic were embroiled in extremely contentious and eventually violent confrontations. During the negotiations for peace, Americans proffered Mabini autonomy for Aguinaldo's new government, but the talks failed because Mabini's conditions included a ceasefire, which was rejected. Mabini negotiated once again, seeking for an armistice instead, but the talks failed yet again. Eventually, feeling that the Americans were not negotiating 'bona fide,' he forswore the Americans and supported war. He resigned from government on May 7, 1899.
On December 10, 1899, he was captured by Americans at Cuyapo, Nueva Ecija, but granted leave to meet with W.H. Taft. In 1901, he was exiled to Guam, along with scores of revolutionists Americans referred to as insurrectos (rebels) and who refused to swear fealty to the United States. When Brig. Gen. Arthur MacArthur Jr. was asked to explain by the U.S. Senate why Mabini had to be deported, he cabled: