William H. Armstrong was born in Williamsport, Pennsylvania, to James Armstrong and Sarah Hepburn Armstrong, his father having been a prominent Pennsylvania lawyer who briefly served on the state supreme court.[1] He graduated from Princeton College in 1847. He studied law, was admitted to the bar and commenced practice in Williamsport. He served in the Pennsylvania State House of Representatives in 1860 and 1861. He declined a commission as president judge of the twenty-sixth judicial circuit of Pennsylvania in 1862.
Armstrong was elected as a Republican to the Forty-first Congress. He was an unsuccessful candidate for reelection in 1870. He declined the office of commissioner of Indian affairs tendered by President Ulysses S. Grant.
Armstrong was appointed, by President Chester A. Arthur, United States Commissioner of Railroads, serving from 1882 to 1885 and resigning shortly after the inauguration of President Grover Cleveland, and being succeeded by Gen. Joseph E. Johnston. He resumed the practice of law in Washington, D.C., and Philadelphia, until 1898, when he retired from active business pursuits. Upon the death of his wife, and after the marriage of his daughters and the removal of his sons to distant parts of the country, Armstrong retired from professional life. While a resident in Williamsport he drew the charter, purchased the water right, and organized the Williamsport water company. He organized the Williamsport Library association, built its first market house, and laid the first block of stone pavement in its streets.[1]