As the county's third immigrant Sheriff, Rankin sailed to America from his homeland of Scotland at the age of 17. After eight months in New York he traveled westward, visiting different parts of the country for four years.
When the Union Pacific Railroad was completed in 1869, Rankin made his home in the San Francisco Bay Area. After engaging in mining for several years, he made a variety of business purchases, including a hotel, a general merchandise store, and the Somersville Mines (from which he sold soft coal to the Southern Pacific Railway).
After serving two terms as Sheriff, the Bank of Martinez called on Rankin to serve as a director and he was soon thereafter made President. Like a number of sheriffs before him, Rankin was a Master Mason as well as a Republican.
The father of eight children, his family home still stands on the outskirts of Rankin Park in Martinez.