The church at Tranent played an important part in the events of the Battle of Prestonpans. The churchyard and the steep-sided heugh beside it were occupied by a party of Camerons on the afternoon of 20th September 1745, and it is from there that they opened fire on General Cope's scout as he ventured up the waggonway. In retaliation, Cope fired his cannons; several clansmen were wounded and the position evactuated.
The churchyard was then used as a corral for the Jacobite horses, including the Prince's horse and the mounts of the 36-strong cavalry wing of the army, Strathallan's Perthshire Horse. The following morning, the officers' horses were taken down the waggonway onto the battlefield so that they could swiftly mount up and regain control of their men during the pursuit.
Following the battle, the mortally wounded Colonel James Gardiner was carried to the manse adjacent to the churchyard upon a cart. Gardiner lived at Bankton House, which falls into Tranent parish, meaning he would have been a regular visitor to the church. He died inside the manse later that morning, and was buried near the south-west corner of the church.
By the end of the 18th century the old medieval church (see model, right) was in a poor state and a new church was built on its site. Fragments of the original church can still be found, such as the filled in window shown top-right.
The parish church in Prestonpans was ministered in 1745 by William Carlyle, whose grave survives just to the the south of the church itself. His more famous son, Alexander ("Jupiter") Carlyle was almost at the end of his studies when the Rising broke our and joined Cope's army as a Volunteer. Together, father and son observed the movements of the Jacobite army at Tranent from the church tower, which still stands although much of the main body of the church was later remodelled.
On the east wall of the churchyward is a very fine but badly worn memorial to Captain John (Coltrane) Stewart of Lascelles' Regiment. He refused to yield and was cut down in the fighting, and is the only soldier other than Gardiner to have a dedicated memorial.
There are several other interesting graves around the churchyard, including the brother of the famous cartographer General Roy.