He represented Renfrew North in the Canadian House of Commons from 1867 to 1869 as a Conservative. He was born in New Glasgow, Nova Scotia, the son of Colin Rankin and Mary Robertson, and was educated in Carleton, Nova Scotia. Rankin later settled in Cobden, Ontario.
Rankin served six years as reeve of Ross Township.
He resigned his seat in the House of Commons in 1869 to allow Francis Hincks to be elected. Rankin was warden of Renfrew County from 1865 to 1866.
He served as customs collector for Bowmanville from 1870 to 1895. He died after a long illness in 1900.