William B. Pettit (October 10, 1825 – January 11, 1905), also known as William Beverley Pettit, was an American lawyer and public official from the Commonwealth of Virginia. He served as president of the Virginia Bar Association and was a delegate to the Virginia Constitutional Convention of 1901.
Pettit was born in Fluvanna County, Virginia, on October 10, 1825. In 1851, he married Arabella Speairs. During the American Civil War, he served in the Confederate Army as an artillery sergeant in a unit from his home county. A published collection of wartime correspondence between Pettit and his wife, dating from March 1862 to March 1865, documents this period.
After the war, Pettit practiced law in Fluvanna County and maintained a wide practice, including work at the court of Louisa County. He was elected Commonwealth's Attorney for Fluvanna County in 1874. In 1878, he purchased "Glen Burnie," a historic property located near Palmyra, Virginia, which remains a historic landmark.
Pettit served as the tenth president of the Virginia Bar Association for the term of 1897–1898. In 1901–02, he was a delegate to the Virginia Constitutional Convention, where he also served a stint as temporary chairman. Pettit died on January 11, 1905, and is buried, along with his wife and several of their children, in the cemetery at Glen Burnie.