He was born on 27 March 1753, the second son of Sir John Anstruther of Elie House, Fife.
He was educated at Glasgow University under John Millar, and called to the bar at Lincoln's Inn in 1779.
He was an active supporter of Charles James Fox, and one of the managers appointed to conduct the Impeachment of Warren Hastings, his duty being to sum up the evidence on the charge relating to Benares, and to open the charge relating to presents.
In 1806 he returned to Britain, was sworn on the privy council and re-entered parliament the same year as member for the Anstruther district of burghs.
He died in London 26 January 1811 and was succeeded by his son Sir John Carmichael-Anstruther, 5th Baronet, who also took his place as MP for Anstruther Burghs.