The oldest part of the Castle of Craigmillar still standing was built sometime during the late medieval period. Constructed upon a crag of rock on the crown of a hill is a fine example of a traditional scottish keep. Built by an important Scottish family of the period, the Prestons, an L-shaped tower rises from the base of the 20 foot scarp to a height of 90 feet. It comprised four storeys consisting a lobby and large basement on the ground floor, lower loft and guard chamber on the first, great hall, kitchen and closet on the second floor and, on the upper floor, upper loft and chamber . Within the roof was a further chamber. Little evidence exists as to a precise age for the tower.
Sometime during the mid 15th century a quadrangle, the inner curtain wall, was built around the tower as fortification, the southerly wall being laid flush with the southern face of the keep. At each corner are machicolated towers standing 30 to 40 feet tall and pierced with inverted gunloops. Along the top of each wall are crenelated parapets. Adjoining the tower was built the east range adding extra chamber rooms. Further timber buildings originally stood within these walls, there still existing various evidential features such as windows and protruding corbels.
Surrounding the castle were, to the south, an ornamental fish-pond carved in the shape of a P,
and to the west, probably constructed in 1510, according to a date plaque above a leading entrance, the terraced west garden. To the east, the east garden, and within, a small chapel built sometime in the early 16th century. Outer walls to the east, north and west were constructed enclosing the east and west gardens and forming a new outer courtyard of some 1 1/4 acres. These walls are, in places, 28 feet high and 5 feet thick. At the north east corner was built a dual purpose defensive tower and dovecot.
Shortly after its destruction in 1544 much of the castle was rebuilt and improved upon by Sir Simon Preston. At this time, there was now an extra kitchen and five further chamber rooms in addition to rooms within the keep. During the following years a favourite resident to Craigmillar was Mary, Queen of Scots.
Shortly after Sir John Gilmour purchased the castle in 1660 he undertook an extensive programme of rebuilding. A new west range was constructed and a turnpike added connecting the tower. Buildings adjoining the inner court wall now consisted two storeys of some 15 rooms including a drawing room, two kitchens and several chambers. In 1687, a church was built within the north west corner of the outer courtyard.
The castle was largely abandoned towards the end of the 18th century. Later, in 1884, Captain Gordon Gilmour, a relative of the aforementioned Sir John, spent a considerable sum toward preserving the ruin. Today, the castle is in the care of the state and managed by Historic Scotland