He was also editor and president of the L'Union printing company.
Desmarais served on the municipal council for Saint-Hyacinthe from 1888 to 1890, when he was elected to the Quebec assembly.
He was defeated when he ran for reelection in 1892, losing to Antoine-Paul Cartier.
He was elected to the House of Commons in the federal elections held in 1896 and 1900.
In 1899, he was named Queen's Counsel.
Desmarais resigned his seat in the House of Commons after he was named judge for Trois-Rivières district in 1901.
He died in Trois-Rivières at the age of 50, after suffering a heart attack.