Tranent lies on a north-facing hillside some three miles inland from the southern shore of the Firth of Forth and about midway between Edinburgh and Haddington. Until 1986 the A1, the Great North Road from Edinburgh to London, went straight through Tranent. Today the A1 curves around to the north, bypassing what nonetheless remains a bustling little town.
As a settlement, Tranent seems to have had ancient origins, possibly dating back to the days of the Votadini, the tribe that occupied East Lothian in the Roman era. The name was first recorded, as Travernment, in a charter from the 1100s, and in the early 1200s, Roger De Quincy, Lord of Tranent, leased rights to the monks of Newbattle Abbey to mine the Great Seam, the 7ft thick seam of coal found close to the surface here.
As a result, Tranent is usually regarded as the oldest mining community in Scotland. From 1722 much of Tranent's coal was carried for export from Cockenzie harbour three miles to the north by the Tranent Wagonway, the first wagonway in Scotland. Initially, the wagonway comprised horse-drawn wagons which ran on wooden rails. Over the next century and a half the wooden rails were replaced by iron, and then the horses by steam engines.
Until 1799 the law treated miners as virtual property of the mine owners, but in an age when agricultural improvements meant far fewer jobs in rural areas, there was never any shortage of men and boys prepared to risk their lives at the coal-face: and women and girls prepared to carry and sort the coal.
The pits of the Esk Basin Coalfield were to dominate this part of East Lothian until the last one closed in 1963. In the 1970s a huge opencast coal mine was opened at Blindwells just to the north-east of Tranent, supplying coal to the Cockenzie Power Station and for export. This ceased operation in 2000, bringing to an end at least eight centuries of coal mining in the area.
Tranent's Parish Church has origins that date back to the 1400s. The town itself was given trading and market rights as a Burgh in 1541, and by 1594 a parish school had been established here. At around this time, Tranent Tower, a three storey tower house, was built on the north side of the town, probably by the Seton family. Today part of the tower can be glimpsed at the end of a residential lane, but it appears inaccessible and in poor condition.
1797 saw the Massacre of Tranent, in which twelve residents of Tranent were shot dead by troops, during a riot against military recruitment quotas under the the 1797 Militia Act. Amongst the dead was Jackie Crookston, whose statue in Tranent's Civic Square helps commemorate the massacre.
40 Tranent miners started Tranent Co-operative Society in 1862 with the aim of providing food and household goods to miners and their families at affordable prices. During the 1926 General Strike, the Co-op provided miners' families with food on deferred payment terms, and membership of the society peaked later in the 1900s at 17,414.