Sir William Whitelock KC (27 December 1636 – 22 November 1717) was an English Tory gentleman, barrister, and member of parliament. His name is also spelt Whitelocke (which was preferred by his father) and Whitlock.
Whitelock was the second son of Sir Bulstrode Whitelocke (1605–1675), parliamentarian and one of Oliver Cromwell's Commissioners of the Great Seal of England. He was the first son of his father's second wife, Frances Willoughby (died 1649), a daughter of William Willoughby, 3rd Baron Willoughby of Parham. As a young man Whitelock joined the Middle Temple and was called to the bar. He lived at Phillis Court, Henley-on-Thames, Oxfordshire, given up to him by his father, and became Treasurer of the Middle Temple. Later in life he was appointed a King's or Queen's Counsel to William of Orange, Queen Anne, and George I.
In 1659 Whitelock was elected to the short-lived Third Protectorate Parliament called by Richard Cromwell, but sat for only one session, from 27 January to 22 April 1659, as one of the two Members of Parliament for Westlow in Cornwall. After Cromwell had dissolved this parliament in April, he recalled the earlier Rump Parliament, in which Whitelock was not a member. In 1660 the Commonwealth collapsed, and the House of Stuart was restored. Whitelock did not return to parliament until shortly after the Glorious Revolution, when in December 1689 he won the by-election at Great Marlow caused by the death of John Hoby, becoming one of the borough's two Members in the House of Commons of England. A few months later, at the general election of 1690, he was elected for Great Marlow again and sat for it until October 1695. At a by-election on 22 November 1703 caused by the departure of Heneage Finch for the House of Lords, Whitelock was elected to represent the High Tory constituency of the University of Oxford. After the Union of England and Scotland in 1707, he continued to represent the University in the enlarged House of Commons of Great Britain until his death.