Charlestown (also known as Charlestown-on-Forth) is a town in Fife, Scotland on the north shore of the Firth of Forth. It is 1.5 kilometres (0.93 mi) west of Limekilns, and 5 kilometres (3.1 mi) south-west of Dunfermline. Charlestown was established in 1770 by Charles Bruce, 5th Earl of Elgin. The planned village is laid out in the shape of a letter E for Elgin. It was established as a harbour town for the shipment of coal mined on Lord Elgin’s Fife estates, and for the production of lime. The harbour’s outer basin was built around 1840.