After completing his studies, Trouillat became one of the professors at the collège of Porrentruy, serving from 1836 to 1860. In 1837, he was put in charge of the library, which then contained 12,000 volumes, a position he held until 1860. He reorganized the collections and in 1838 published a Catalogue raisonné des éditions incunables de la Bibliothèque du collège de Porrentruy (Annotated Catalogue of Incunabula Editions of the Porrentruy College Library), followed by a Rapport sur la Bibliothèque du collège de Porrentruy, son origine, ses développements et sa réorganisation (Report on the Porrentruy College Library, its Origin, Development and Reorganization) in 1849.[1]
When the archives of the former Prince-Bishopric of Basel returned to Porrentruy in 1842, Trouillat became their conservator. This marked the beginning of his work as a historian, which led to the publication of the Monuments de l'histoire de l'ancien Evêché de Bâle recueillis et publiés par ordre du Conseil-exécutif de la République de Berne (Monuments of the History of the Former Bishopric of Basel Collected and Published by Order of the Executive Council of the Republic of Bern) between 1852 and 1861. The fifth volume, published after his death, was completed by Louis Vautrey in 1867.[1]
Trouillat entered politics in 1839. Initially of liberal tendency, he moved toward conservatism following the establishment of the federal state in 1848. Elected mayor of Porrentruy the same year, he made the city the center of opposition to the centralizing attempts of the Bernese government, notably by paralyzing from 1856 onward the transformation of the Catholic collège into a confessionally mixed cantonal school. This attitude led the Bernese government, aided by Jura radicals, to suspend him from the mayoralty and to remove him from his teaching position in 1860. Trouillat then continued his struggle for the defense of Jura regionalism by launching Le Réveil du Jura and La Gazette jurassienne, newspapers that became the laboratory of conservative Catholic ideology in the Jura. A founding member of the Société jurassienne d'émulation in 1847, he broke definitively with the society in 1854 due to personal, political, and historiographical disagreements.[1]