William Forbes Mackenzie (18 April 1807 – 24 September 1862) was a Scottish Conservative politician and temperance reformer. He is best known for the Forbes MacKenzie Act, legislation passed in 1853 to regulate public houses in Scotland.
Born in Exmouth, Devon, he was the third son of Colin MacKenzie, writer to the signet in Edinburgh and his wife, Elizabeth, daughter of Sir William Forbes of Pitsligo. He studied for the law, and was called to the bar in 1827. In 1830 he married Helen Anne Montgomery, daughter of Sir James Montgomery, and they had two children. In 1831 he was appointed a deputy lieutenant of Peeblesshire.
At the 1837 general election he was elected to the House of Commons as member of parliament for Peeblesshire. He was re-elected as member for the constituency in 1841 and 1847. He was one of Sir Robert Peel's junior Lords of the Treasury from 26 April 1845 until the end of the latter's second premiership. He was an advocate of Catholic and Jewish emancipation and supported the administration's increase of the grant to Maynooth College. However, in May 1845 he threatened to resign from office as he felt that the Jewish Disabilities Reform Bill did not carry reforms far enough. He finally resigned from the government on 11 April 1846 over the Corn Laws, an issue which quickly led to the collapse of the administration.