Born in Pine Creek Township, Clinton County, Pennsylvania, Hamilton attended public schools and was graduated from the Columbia Law School in Columbia, Pennsylvania.
[1][dubious – discuss] During the American Civil War, Hamilton entered the Union Army as a private in 1861 and served in Company A, Fifth Regiment, Pennsylvania Reserves.
Hamilton was admitted to the bar in 1867 and commenced practicing law in Marianna, Florida.
Upon the readmission of the State of Florida to representation, Hamilton was elected as a Republican to the Fortieth and Forty-first Congresses and served from July 1, 1868, to March 3, 1871.
Hamilton died in Pine Creek Township, Clinton County, Pa. and was interred at the Jersey Shore Cemetery.