Preston, the nephew of Francis Preston, was born Louisville, Kentucky. He pursued preparatory studies and graduated from St. Joseph's College in Kentucky. He attended Yale College in 1835 and graduated from the law department of Harvard University in 1838. After graduation from Harvard, Preston was admitted to the bar and commenced practice in Louisville in 1839.
He served as lieutenant colonel of the 4th Kentucky Volunteers in the Mexican–American War (1846–1848). After the war, he was a delegate to the State constitutional convention in 1849 and a member of the Kentucky House of Representatives in 1850. Subsequently, he served in the State senate 1851–1853. He was elected as a Whig to the Thirty-second Congress to fill the vacancy caused by the resignation of Humphrey Marshall and reelected to the Thirty-third Congress and served from December 6, 1852, to March 3, 1855. He stood again for another term in 1854 but was unsuccessful. President James Buchanan appointed Preston as Envoy Extraordinary and Minister Plenipotentiary to Spain in 1858. He resigned as ambassador in 1861 at the outbreak of the Civil War.
Although his home state of Kentucky did not secede from the Union, Preston served in the Confederate Army and attained the rank of brigadier general. He was appointed Envoy Extraordinary and Minister Plenipotentiary from the Confederacy to Maximilian, Emperor of Mexico in 1864.
After the war, he again served as a member of the Kentucky State house of Representatives in 1868 and 1869.
William Preston died in Louisville and was interred in Cave Hill Cemetery in Louisville.
Template:Start box |- ! colspan="3" style="background: #FACEFF;" | Diplomatic posts
|- style="text-align: center;"
|width="30%" align="center" rowspan="1"|Preceded by
Augustus C. Dodge |width="40%" style="text-align: center;" rowspan="1"|U.S. Minister to Spain
1858–1861 |width="30%" align="center" rowspan="1"| Succeeded by
Carl Schurz |- |}