The present Town of Hamilton was once occupied by several native tribes. European settlers arrived in the 1730s. In 1768, George and Tabitha Roach Tavenner built the first house in the Hamilton area. Their son, Richard and his wife Ann Hatcher, built an estate called Harmony and the surrounding area was thereafter known as Harmony. The Leesburg and Snickers Gap Turnpike Company opened a road connecting Leesburg and Snickersville in 1831. Growth ensued and by 1833, the area had enough population to sustain Harmony Methodist Church, which was built on land donated by Richard and Ann Hatcher Tavenner. The town also became known as Hamilton Store after a store founded there by Charles Bennett Hamilton. In 1835, John Quincy Adams approved a post office located in Hamilton's store and the town's name was recorded as Hamilton. The last important Civil War action in Loudoun County, known as The Harmony Skirmish, took place on March 21, 1865 as confederate Colonel John S. Mosby and his troops surprised troops commanded by Colonel Marcus Reno. By 1868, a steam railroad from Alexandria had come to Hamilton along the future route of the Washington and Old Dominion Railroad. Many tourists came to the town seeking relief from the city's heat. There was a one and 1/2 mile boardwalk that traversed the town and a dance hall. By 1900, the Town of Hamilton was Loudoun County's second largest town. The booming businesses in Hamilton included two newspapers, a butcher shop, a men's clothing store, a broom factory, a milliner, a dentist, two hardware stores, a stove shop, a flat racecourse, a livery stable and boarding houses. The advent of the automobile led to a slow decline in tourism. In 1926, many of the town's central businesses were destroyed by fire and tourism thereafter declined sharply. Hamilton has since been known more as a residential community. The Hamilton Masonic Lodge, Janney House, William Smith House, Spring Hill Farm, and Sunnyside Farm are listed on the National Register of Historic Places.
As of the census of 2000, there were 562 people, 216 households, and 157 families living in the town. The population density was 2,218.2 people per square mile. There were 224 housing units at an average density of 884.1 per square mile. The racial makeup of the town was 97.69% White, 1.42% African American, 0.53% Asian, 0.36% from other races. Hispanic or Latino of any race were 1.07% of the population. There were 216 households out of which 41.7% had children under the age of 18 living with them, 58.3% were married couples living together, 13.0% had a female householder with no husband present, and 26.9% were non-families. 21.8% of all households were made up of individuals and 6.5% had someone living alone who was 65 years of age or older. The average household size was 2.60 and the average family size was 3.05. In the town, the population was spread out with 28.3% under the age of 18, 4.4% from 18 to 24, 33.3% from 25 to 44, 26.0% from 45 to 64, and 8.0% who were 65 years of age or older. The median age was 37 years. For every 100 females, there were 87.3 males. For every 100 females age 18 and over, there were 79.9 males. The median income for a household in the town was $59,688, and the median income for a family was $73,333. Males had a median income of $53,571 versus $32,857 for females. The per capita income for the town was $27,474. About 2.4% of families and 3.3% of the population were below the poverty line, including 3.6% of those under age 18 and 6.1% of those age 65 or over.