Early settler R.D. Moore conveyed 320 acres of land to the International Construction Co. (also called the Orient Land Co.) of Kansas City, Missouri, for a town site along the Panhandle Gulf Railway in September 1902. Probably named for Orient executive W.H. Hamlin, the Hamlin community was organized in 1905, the same year it received its first post office. The Kansas City, Mexico and Orient Railway reached Hamlin in 1906 and a newspaper, the Hamlin Herald, was first printed that same year. Hamlin was incorporated as a town and a school system was established in 1907. By autumn 1908, Hamlin had grown to more than one thousand citizens as more railroads reached the area.
Hamlin quickly became a major shipping point, with its economy based on agriculture and the railroad. Among the town's business operations were cotton compresses, a cotton oil mill, an ice plant, a cement and plaster plant, a grain elevator, several cotton gins, an electric generating plant, an ice cream factory and bottling works, and a telephone company. Churches formed in Hamlin's early days included Church of Christ, Baptist, Methodist and Church of the Nazarene. A movie theatre opened in 1907. Central Nazarene College was established in 1909. The Oscar DePriest School System for African American students began operation in 1925.
Oil was discovered near Hamlin in 1928, broadening the area's economic growth with oil and gas exploration. In 1950, the town's population was 3,564. The school system was integrated in 1965. The population of Hamlin in 1990 was 2,791. At the dawn of the 21st century, Hamlin remains a center for farming and varied manufacturing.