Hamlin was named after a railroad official of the Kansas City, Mexico and Orient Railway. Hamlin was named for Orient official W. H. Hamlin. The Orient reached Hamlin in 1906 and was followed by the Texas Central Railroad within a couple of years and by the Abilene and Southern Railroad in 1910. The arrival of the railroad was announced in 1902 and the first train arrived in 1906. The county's first gypsum plant was constructed six miles outside of Hamlin in 1903. Business boomed with the rail service, and the town included gins, a cottonseed oil mill, and a number of other businesses. Oil was discovered in 1928 which also contributed to the economy. The Hamlin Herald was first published in 1906 and still prints as of today. Hamlin would later gain its first and only hospital, Hamlin Memorial, in 1948.
There were 924 households out of which 29.5% had children under the age of 18 living with them, 52.7% were married couples living together, 10.8% had a female householder with no husband present, and 32.5% were non-families. 31.6% of all households were made up of individuals and 18.6% had someone living alone who was 65 years of age or older. The average household size was 2.39 and the average family size was 3.00.
In the city the population was spread out with 25.7% under the age of 18, 6.8% from 18 to 24, 22.9% from 25 to 44, 22.7% from 45 to 64, and 21.9% who were 65 years of age or older. The median age was 41 years. For every 100 females there were 87.3 males. For every 100 females age 18 and over, there were 78.9 males.
The median income for a household in the city was $25,873, and the median income for a family was $33,667. Males had a median income of $25,887 versus $16,350 for females. The per capita income for the city was $13,308. About 13.7% of families and 20.7% of the population were below the poverty line, including 27.6% of those under age 18 and 21.2% of those age 65 or over.