The area around Hiratsuka has been settled since prehistoric times, and mention of the area as part of ancient Ōsumi District, Sagami Province is found in Nara period records. From the Heian period through Kamakura period, the area was divided into "shōen" controlled by various samurai clans and in the Sengoku period was the site of several battles between the later Hōjō clan of Odawara and the Miura clan. After the defeat of the Odawara at the Battle of Odawara by Hideyoshi Toyotomi, the area came under the control of Ieyasu Tokugawa, who built a summer palace (the "Nakahara Goten") in 1596 at the site now occupied by the Hiratsuka City Nakahara Elementary/Primary School. Hiratsuka was retained as "tenryō" territory after the establishment of the Tokugawa shogunate, and flourished as Hiratsuka-juku, a post town on the Tōkaidō connecting Edo with Kyoto. As the 7th station, it is often depicted in the series of ukiyo-e about the 53 Stations of the Tōkaidō made among others by artists such Hokusai and Hiroshige.