The city of Nakhon Nayok dates back to the Dvaravati Kingdom, probably founded in the 11th century. Ruins from this time are visible at Mueang Boran Dong Lakhon south of the modern city. It was originally named "Mueang" Lablae. The name Nakhon Nayok was assigned to it in 1350, when it became a garrison town of the Ayutthaya kingdom protecting the eastern boundary.