He was born at Magbie Hill in October 1721, the second son of William Montgomery, advocate, of Coldcoat or Magbie Hill, Peeblesshire.
But at the general election of 1768, he was returned for Peeblesshire, a seat which he retained till he was raised to the bench.