Career
Born in Stradbally, County Laois, Ireland, the son James Shanly and Frances Elizabeth Mulvany, he immigrated to Upper Canada in 1836. In 1863, he was elected to the Legislative Assembly of the Province of Canada for the riding of Grenville South. In 1867, he was elected to the Canadian House of Commons for the riding of Greenville South.
A Conservative, he was defeated in 1872 and 1874.
He returned to politics upon the death of the current Member of Parliament, William Thomas Benson, who died in 1885. He was acclaimed in the resulting by-election and was re-elected in 1887.