The Chapel was built on the highest point of the castle rock in the early 12th century by King David I, the youngest son of Saint Margaret. It is a very simple building, a small rectangular structure with an apsed sanctuary and a nave separated by a chancel arch decorated with chevron mouldings.
When the castle was captured by the Earl of Moray on 14th March 1314 and demolished on the orders of King Robert the Bruce to prevent it from falling again in to the hands of the English, the Chapel was spared. On his deathbed Bruce gave orders and funds for the Chapel to be repaired. After the Reformation it was practically forgotten. By 1845 the windows had been blocked up and it was being used for storing gunpowder. Restoration was begun in 1853 by Sir Daniel Wilson who uncovered the windows. Stained glass windows with representations of Saint Margaret and other Scottish saints and heroes designed by Dr Douglas Strachan were installed in the 1920s. Sir David Russell continued the restoration of the Chapel and it was rededicated on 16th March 1934.
A major refurbishment of the Chapel was undertaken in 1993 to mark the 900th anniversary of the death of St Margaret. Ten benches with carved roundels in limewood were commissioned by the Guild, along with an alms-chest, a flower stand, and a display case for a replica of St Margaret's Gospel book, all made in oak by the cabinetmaker Piers Kettlewell.
A new altar frontal was designed and worked by Hannah Frew Paterson, M.B E. It is richly embroidered with symbols of the life and work of St Margaret.
A service of re-dedication for the refurbished Chapel was held on St Margaret's Day, 16th November 1993.
Although the Chapel stands within the Castle and is part of that historic monument, it is still a consecrated building used for religious services, including baptisms, weddings and the Guilds services held annually on November 16th, St Margarets Day. These are conducted by the Minister of the Canongate Kirk, who is also the President of the Guild, as the castle falls within the parish of the Canongate.
When the castle is closed to the public, the Chapel is available for use by the castle garrison for quiet prayer and reflection.