The Town of Hamlin was created as the "Town of Union," but was renamed in 1861 as the Town of Hamlin in honor of Lincoln's first Vice President Hannibal Hamlin.

Hamlin was initially a part of the town of Northampton. The town of Murray split from Northampton in 1807, and split again into Union and Clarkson on December 14, 1852.

The northern boundary is Lake Ontario and the western town line is the border of Orleans County, marked by New York State Route 272. The south town line borders the town of Clarkson, marked by Clarkson Hamlin Town Line Road that intersects Lake Road south of Hamlin village. The eastern town line borders the town of Parma, marked by Hamlin-Parma Townline Road.

The Lake Ontario State Parkway passes across the north part of the town.  As of the census of 2000, there were 9,355 people, 3,255 households, and 2,532 families residing in the town.