He was one of 12 children of Sir James Steuart, Solicitor General for Scotland under Queen Anne and George I, and was born in Edinburgh. His mother was Anne Dalrymple, daughter of Lord North Berwick, the Lord President of the Court of Session. After graduating from the University of Edinburgh he was admitted to the Scottish bar at the age of twenty-four.