At the age of 18, he attended the academy in Aurora, Cayuga County, New York, then spent a winter teaching school.
In 1847 he married Mary C. Jaycox, of Mecklenburg, who would become the mother of two children before her death in 1854, though neither child survived long.
He had been a Democrat, but with free soil sympathies; but in 1856 joined the Republican, of which he would remain a local leader throughout his career.
He was appointed to the standing committees on the militia, on federal relations, on education, and on internal improvements[3] At the close of the 1864 Senate session, Governor James T. Lewis appointed him as Winnebago County's county judge to fill the vacancy created by the elevation of Judge George W. Washburn.
He was succeeded in the Senate by George Barnum, who like Hamilton and most Republicans had adopted the National Union Party label that year.