He was elected to the Legislative Assembly of New Brunswick in 1861, and became an opponent of Canadian Confederation and of the government of Samuel Leonard Tilley which he helped defeat in 1865.
New Brunswick entered Confederation as a province in 1867 and Anglin won a seat in the new House of Commons of Canada as a Liberal Member of Parliament (MP) for the riding of Gloucester in the country's first general election.
When the Liberals came to power in the 1874 election, the new Prime Minister of Canada, Alexander Mackenzie, nominated Anglin as speaker of the House of Commons.
Anglin was accused of violating the Independence of Parliament Act for accepting government printing contracts, and was censured by the House of Commons Committee on Privilege in 1877.
Anglin was forced to resign as Speaker and as an MP, but was re-elected to the House of Commons in the by-election that was held to fill his seat.