Located at the heart of the old village of Restalrig just to the east of central Edinburgh, the origins of St. Margaret's Parish Church can be traced back to the 12th Century. A Norman church was begun in 1165 by Edward de Lestalric and, in 1435, patronage transferred to the Logan family, who held the Barony of Restalrig until 1609. In 1487, it was created a Collegiate Church by King James III and was supported by James IV and James V. Such was the importance of this church that, in 1560, it was singled out for destruction by zealous supporters of the Reformation, who tore down the walls. South Leith became the Parish Church and St. Margaret's lay ruined until 1828, when plans were drawn up for its restoration. However disputes with the Minister and Presbytery of South Leith ensured that the rebuilding did not begin until 1836. The work, which recreated a heavily-buttressed church in the Scots Gothic style, was undertaken by architect William Burn (1789 - 1870) and was completed in 1837. In 1912, St. Margaret's was re-established as the Parish Church of Restalrig. Today the church exhibits some fine stained-glass, including a memorial window to the Logan family, a number of whose members are buried in the kirkyard. A major renovation of the church began in 2002.
Adjoining is the hexagonal 15th Century St. Triduana's Well. The kirkyard includes several interesting memorials, dating back to the 17th Century.