His education was first at the Collège de Joliette, then at Université Laval's Montreal campus for law studies (which is today the Université de Montréal). He was formally installed as a lawyer in 1884.
Lavallée worked with Hormidas Laporte to create the Alliance Nationale insurance company in 1892. After an unsuccessful campaign at the St. James riding in the 1896 federal election, Lavallée became a Montreal local councillor, since 1900 for the Saint-Jacques ward then in 1904 at La Fontaine ward. In 1912, he was elected Mayor of Montreal and served that role until the 1914 election.
During his local political career, Lavallée promoted consolidation and amalgamation of municipalities towards a larger Montreal government and saw annexation of municipalities such as Côte-des-Neiges during that time.