A revolutionary general and provincial governor, Trias was born in San Francisco de Malabon, a town of Cavite now renamed after him. He was the fourth or fifth among eight or nine children of Balbino Trias and Gabriela Closas. His father was a cabeza de barangay who became justice of the peace during the Spanish regime.
Mariano Trias had primary schooling under the tutorship of local school teachers Eusebio Chaves and Cipriano Gonzales. Later, he was sent to Manila, went to a school conducted by Jose Flores, and transferred to San Juan de Letran where he must have obtained his A.B. Degree. Thereafter, he pursued a medical course in the University of Santo Tomas, but was unable to pursue further studies due to the outbreak of the Revolution in August 1896.
Trias actively propagated the ideals of the Katipunan in the towns of Silang and Kawit, where members were initiated. When the Katipunan popular council of San Francisco de Malabon organized the Sangguniang Balangay of Mapagtiis, he was elected as fiscal.
The greater part of Cavite fell into the hands of Katipunan revolutionists and gave rise to two provincial councils: Sangguniang Bayang Magdiwang and the Sangguniang Bayang Magdalo. Trias became the Minister of Justice and Grace in the first group.
In the Assembly at Tejeros in March 1897, he was elected vice-president, with Emilio Aguinaldo as president. He led several attacks in Cavite and Laguna against Spanish forces. The revolutionary government was reorganized in Biyak-na-bato in November 1897. Again, he was chosen vice-president with Aguinaldo as president.
Trias continued to take an active part in the second stage of the Revolution. He, with the cooperation of Artemio Ricarte, drove away the Spanish force in the former's hometown. Upon the establishment of the Revolutionary Government, he was appointed on July 15, 1898 as Secretary of Finance in Aguinaldo's cabinet. He continued in this office even after the transfer of the seat of the government in Malolos and until the formation of the Mabini cabinet the following year. In the succeeding Paterno cabinet, he served as Secretary of War. After the dispersal of the Revolutionary Government forces in Central Luzon, he was named commanding general of Southern Luzon.
He then directed guerrilla offensives but peacefully surrendered on March 15, 1901.
In June 1901 he was appointed provincial governor of Cavite after the civil organization of the province on June 11, 1901, in accordance with Act No. 138. Thus, he became the first Filipino governor of the province. He pacified the province and cleared it of brigand bands who overran it. Being a member of the honorary board of Filipino commissioners to the Louisiana Purchase Exposition, he sailed for the USA in 1904.
He was married to Maria Concepcion Ferrer, by whom he had eight children.
Trias died of appendectomy at the Philippine General Hospital on January 22, 1914. In 1923, his remains were transferred from Manila to his hometown.