Shafto was the eldest son of Mark Shafto of Whitworth and his wife Margaret Ingleby, daughter of Sir John Ingleby, 2nd Baronet of Ripley, Yorkshire. He matriculated at Lincoln College, Oxford in 1708.[1]
Shafto was returned as Member of Parliament (MP) for the City of Durham at a by-election on 3 March 1712. On 10 April 1713 he was appointed to help prepare a bill making Stockton, Durham, a separate parish and on 18 June 1713 he voted against the French commerce bill. He did not stand at the 1713 British general election.[2]
Shafto succeeded his father in 1723 and married Dorothy Dawnay, daughter of Henry Dawnay, 2nd Viscount Downe on 17 October 1723. He became a Freeman of Durham in 1726.[2]