William Maxwell, 5th Earl of Nithsdale (1676 – 2 March 1744) was a Catholic nobleman, who took part in the Jacobite Rising of 1715.
He was the eldest son of Robert, fourth Earl of Nithsdale (1627/8–1683), and Lady Lucie Douglas (d. 1713), daughter of William, eleventh earl of Angus and first Marquess of Douglas. He was probably born at Terregles Castle, near Dumfries. The early death of his father ensured that he was raised by his mother, the Dowager Countess, who educated him to be a faithful and conventionally devout Roman Catholic and a partisan of the Stuart cause.
On reaching the age of twenty-one, in 1697, he visited the Jacobite Court at Saint-Germain to give his allegiance to the exiled King James II & VII, where he met his future wife Lady Winifred Herbert, daughter of the Duke of Powis. After their marriage at Saint-Germain in 1699, they settled at his family seat at Terregles. As a prominent Catholic in the predominantly covenanting Lowlands, he was on a number of occasions the object of Presbyterian assaults on his estate, on suspicion of harbouring Jesuits.
Despite his discretion, he was long suspected of Jacobite sympathies. In the Jacobite rising of 1715, after some hesitation, he proclaimed James III and VIII at Dumfries and Jedburgh, before joining the main Jacobite forces at Hexham under General Thomas Forster. Nithsdale was captured at Preston together with other Jacobite leaders, found guilty of treason, and sentenced to death. The night before the day appointed for his execution (24 February 1716), he effected an escape from the Tower of London meticulously planned by his daring and devoted Countess, who had been admitted to his room. By exchanging clothes with his wife's maid, he escaped the attention of his guards. He fled to Rome, where he lived with his wife until his death.