Meredith was elected Pennsylvania's attorney general in the 1860 election, and served for two terms (from 1861 until 1867).
William Meredith later served as a member of a commission working out the settlement of the Alabama claims, in 1870.