He was the fifth and last son of Sir James Cockburn, 8th Baronet (1729–1804) and his second wife Augusta Anne Ayscough.
He had first joined the 7th Dragoon Guards at the age of 19 and served in South America and the Iberian Peninsula.
Following his marriage, he was sent to Canada in 1811 as a captain in the Canadian Fencibles and fought in the War of 1812 against the United States.
He helped establish military settlements at Perth, Richmond, Lanark, the Bay of Quinte, Glengarry County and on the Saint-François River in Lower Canada.
During his time there, he helped establish the price of lands for properties in Upper Canada and provided advice on the best locations for settlement in the region.