Dalkeith is a town in Midlothian, Scotland, lying on the River Esk. It was granted a burgh of barony in 1401 and a burgh of regality in 1540. The settlement of Dalkeith grew southwestwards from its 12th-century castle. Dalkeith has a population of 11,566 people according to the 2001 census. The town is divided into four distinct areas: Dalkeith proper with its town centre and historic core, with Eskbank to its west and Woodburn to its east.