The town was granted by Colonial Governor Jonathan Belcher in 1735 as "Number 5" to settlers from Hopkinton, Massachusetts, who renamed it "New Hopkinton." First settled in 1736, colonists were required to build homes, fence in their land, plant it with English grass, and provide a home for a minister, all within seven years. The community would be incorporated in 1765 by Governor Benning Wentworth. Built in 1789, the Congregational Church has a Revere bell. The legislature met in Hopkinton occasionally between 1798 and 1807. In 1808, the town competed for the coveted position of state capitol, but was defeated by nearby Concord.
A substantial portion of the town in the north was named "Contoocook Village" for a tribe of the Pennacook Indians who once lived there. Due to its position along the Contoocook River, it became a center for water-powered industry, particularly lumber and textiles. The covered railroad bridge located in Contoocook Village is a remnant of the Boston & Maine Railroad, and is the oldest covered bridge of its kind still standing in the United States.
Since 1915, Hopkinton has been home to the Hopkinton State Fair, an event which attracts thousands of visitors each year during the Labor Day weekend. The high school teams are nicknamed the Hawks.
As of the census of 2000, there were 5,399 people, 2,084 households, and 1,544 families residing in the town. The population density was 124.7 people per square mile (48.2/km²). There were 2,210 housing units at an average density of 51.1/sq mi (19.7/km²). The racial makeup of the town was 98.46% White, 0.13% African American, 0.26% Native American, 0.26% Asian, 0.07% Pacific Islander, 0.04% from other races, and 0.78% from two or more races. Hispanic or Latino of any race were 0.50% of the population.
There were 2,084 households out of which 35.2% had children under the age of 18 living with them, 65.1% were married couples living together, 6.1% had a female householder with no husband present, and 25.9% were non-families. 20.3% of all households were made up of individuals and 9.6% had someone living alone who was 65 years of age or older. The average household size was 2.59 and the average family size was 3.01.
In the town the population was spread out with 26.5% under the age of 18, 4.2% from 18 to 24, 25.4% from 25 to 44, 30.5% from 45 to 64, and 13.3% who were 65 years of age or older. The median age was 42 years. For every 100 females there were 93.8 males. For every 100 females age 18 and over, there were 90.4 males.
The median income for a household in the town was $59,583, and the median income for a family was $69,737. Males had a median income of $50,107 versus $28,974 for females. The per capita income for the town was $30,753. About 0.7% of families and 1.8% of the population were below the poverty line, including 1.8% of those under age 18 and 2.4% of those age 65 or over.