He graduated from the Mount St. Mary's College in 1840 and studied law under James M. Cole, a local Littlestown attorney.
Afterwards he worked as the president of the Littlestown Railroad Company before being elected to a term in the Pennsylvania State Senate serving as a Democrat from 1863 to 1866.
In 1874 he was named the assessor for the 16th Pennsylvania District of the Internal Revenue Service.
McSherry also worked as the director of the Gettysburg National Bank, Littlestown Savings Institution, and the Gettysburg and Petersburg Turnpike Company.
William McSherry died on January 10, 1899, in Littlestown and was interred in the Saint Aloysius Cemetery in neighboring Germany Township.