Mackenzie was born in Scotland and immigrated to Upper Canada in 1820. From 1824 to 1834 he published the newspaper the Colonial Advocate in York (Toronto), attacking the upper class clique known as the "Family Compact" which was in control of the government. In response to this, a mob threw his printing press into Lake Ontario in 1826. In 1828 he was elected to the Legislative Assembly of Upper Canada, but was expelled five times for libel, each time being re-elected.
In 1834 he became the first mayor of Toronto, and in 1836 he founded the newspaper, The Constitution, to promote the policies of his Reform Party. He was opposed to Sir Francis Bond Head, and in 1837 led the Upper Canada Rebellion against Bond Head and the Family Compact, which was quickly put down. Mackenzie escaped to the United States, and set up a provisional government on Navy Island in the Niagara River. He was later imprisoned in the U.S. for his involvement in the Caroline Affair. An amnesty allowed his return to Canada in 1849, and he was a member of the Legislative Assemby of the Province of Canada from 1851 to 1858.
William Lyon Mackenzie was the grandfather of William Lyon Mackenzie King.