Captain John Porteous (died 1736) was Captain of the City Guard of Edinburgh during the riots of 1736.

As Captain of the City Guard, Porteous was charged with keeping the peace and when, in April 1736, two convicted smugglers were due to be publicly hanged, the public outcry was such that the hangman had to be placed in protective custody. As the situation worsened, the Lord Provost of Edinburgh (fearing an attempt to rescue the condemned) instructed Captain Porteous to call out the entire guard and to furnish them with powder and shot.

After the execution the mob became violent, and Captain Porteous instructed his men to fire into the crowd, killing three people and wounding twelve others. For this offence, Porteous himself was eventually tried in the High Court of Justiciary and found guilty of murder and sentenced to death.

Although later granted a Royal Pardon, Captain Porteous was dragged out to be cruelly tortured and lynched himself at the hands of an angry mob. The spot where he died is today marked by a memorial plate in Edinburgh's Grassmarket.

A detailed account of the so-called Porteous Riots is given by Sir Walter Scott in his novel The Heart of Midlothian.