William Johnstone, 2nd Earl of Annandale and Hartfell, 1st Marquess of Annandale KT (17 February 1664 – 14 January 1721) was a Scottish nobleman. He was the son of and Henrietta Douglas. He succeeded to the Earldom of Annandale and on the death of his father in 1672. He opposed the Union, but later served as a representative peer from 1709 to 1713. He was Keeper of the Great Seal of Scotland from 1714 to 1716.