The area of present-day Hamura has been inhabited since Japanese Paleolithic times, and numerous remains from the Jōmon, Yayoi and Kofun periods have been discovered. During the Nara period, it became part of ancient Musashi Province. The Tamagawa Josui, an artificial waterway completed in 1653 to divert water from the Tama River and carry it as drinking water to Edo, begins in what is now part of Hamura.
In the post-Meiji Restoration cadastral reform of April 1, 1889, several villages (one of which was named Hane-mura) merged to form Nishitama Village in Nishitama District, at that time part of Kanagawa Prefecture. The entire district was transferred to the control of Tokyo Prefecture on April 1, 1893. In 1956, Nishitama Village became the town of Hamura. On November 1, 1991, Hamura was elevated to city status.
Hamura is primary a regional commercial center, and a bedroom community for central Tokyo. Several electronic companies have light industrial or logistical facilities in Hamura. Hino Motors and Toyota have a plant and test track in the city.