The estate of Craigie is recorded as belonging to one John de Craigie in the reign of David I (1124–1153). In 1387 the estate passed by marriage to John Stewart, son of Sir Robert Stewart of Durisdeer. The Stewarts sold the estate, which by this time had a tower house, in 1643 to John Fairholm, treasurer to the City of Edinburgh. In 1682 John Fairholm's granddaughter Sophia, aged only 14, married William Johnstone, 2nd Earl of Annandale, and Craigiehall changed ownership again. Only two built features on the estate date from before this time; the 17th century east sundial, and the ruined doocot, or pigeon house, dated 1672. The east sundial is one of only 25 obelisk-type sundials in Scotland, and was re-erected to the east of the house in 1965, after being found in a field to the south of the house.
The couple set about planning a new house to replace the aging tower house, and in 1694 the Earl contacted Sir William Bruce, who promised to design "a convenient little house, gardings and courts". The property was surveyed by John Adair, and the old tower house was taken down. The survey took the place of a site visit by Bruce, who was at this time under virtual house arrest, due to his political leanings, and suspected Jacobite sympathies. Design submissions were also obtained from James Smith and Robert Mylne. Smith's scheme was judged too small and irregular by Bruce, who urged the Earl to agree to his own "modish and regullar designe". However, the house as built by Bruce is partially based on Smith's early design. Before work on the house commenced, a courtyard, 500 by 400 feet (150 by 120 m) across, was laid out, establishing the formal arrangement in which the house would sit. On 16 February 1698, a contract was signed between Lord Annandale and the mason Thomas Bauchop, for a house 64 by 46 feet (20 by 14 m), and 28 feet (8.5 m) high, all "according to the modell of wood and draught signed by Sir William Bruce of Kinross".
Bruce's new house was complete by 1699, and was worked on by many of the same craftsmen who were engaged by Bruce at nearby Hopetoun House, which was under construction at the same time. Craftsmen included the plasterers John McKay and Thomas Albur, cabinet maker William Scott, plumber Joseph Foster, smith Alexander Gardener, and the wright Andrew Barclay. The staircase, with its wrought-iron balustrade decorated with roses, thistles, tulips and oak leaves, bears many similarities to the one at Caroline Park, Granton, and was the work of the smiths James Storrie and James Horne.
The building comprises a compact, three-storey house, in the Dutch-classical style which was introduced into England by Sir Roger Pratt, and is typical of Bruce's work. The six-bay entrance front has a two-bay projecting central section, surmounted by a pediment topped by three pineapples, of which one remains. The tympanum is carved with the coat of arms of the Earl and his wife, with their initials (WEA and SCA for William, Earl of Annandale, and Sophia Countess of Annandale) and the date 1699. The roof behind was bell-cast, with a cupola and four tall chimneys symmetrically placed, although this was replaced in the 1950s. The centrally placed entrance is reached by steps, and surmounted by carved decorations. The garden front is similar, and is also topped by a decorated pediment. Once the house was complete, two wings connected by curved passages were added. These incorporated additional accommodation and a library, but the passages and south wing were later demolished.
Inside, Bruce planned two apartments: a state apartment, comprising dining room, drawing room, bedroom and dressing room, with a second smaller apartment to the south. Bruce's panelling survives in part of the south apartment, which was later turned into a single room. The chimneypiece and wood carving in the "Blue Room" is also 17th century. The centrally placed stairwell, lighted from above, would be developed more fully by Bruce in his design for Hopetoun House.
The walled garden to the north-east was built in 1708 by Alexander McGill, to designs by the Earl of Mar, who also designed the gate piers and garden buildings, and supplied statuary. The garden may have been balanced by a similar walled garden to the south-east of the house. No trace is now visible, but a second garden is shown on 18th century maps of the area, and would have been consistent with Bruce's symmetrical layout.
In 1741, the 2nd Marquis of Annandale left Craigiehall to his nephew, Charles Hope-Weir (1710–1791), second son of Charles Hope, 1st Earl of Hopetoun. Hope-Weir travelled to Europe on the grand tour in 1754-55, taking with him the young architect Robert Adam, and was inspired to improve the Craigiehall policies on his return. A walled forecourt and the formal gardens in front of the house were removed. He also planted numerous trees across the estate, laid out avenues, and had several garden buildings constructed. A lake was excavated, and a new bridge over the River Almond was constructed to link the neighbouring estate of Lennie, which Hope-Weir had bought in 1750.
The rustic arched Grotto Bridge is dated 1757. It bears Hope-Weir's initials, with the inscription UTILI DULCI, taken from Horace, and translatable as "the useful with the sweet". It was built to a design by "J. Adam", either John or James, Robert's brothers. The bridge spans a particularly picturesque section of the Almond, with rapids flowing under the single span.
Upstream from the bridge is a grotto and bath house, built in a similar rustic style and presumably by the same architect. The bath house is a square vaulted chamber, with a plunge pool fed by river water. The upper chamber comprises a circular saloon with windows, although this is now roofless and in poor condition. The original roof was a conical thatched structure, and a niche on the exterior wall may have housed a statue.
An avenue of oak trees runs up Lennie Hill from the Grotto Bridge. At the summit, Hope-Weir had an ornamental temple built in 1759, commanding wide views of the expanded estate and beyond. Craigiehall Temple was a circular two-storey structure, with a stair tower at the rear and a pedimented portico on the front. The segmental pediment bears the arms of the 1st Marquess of Annandale, and so predates the temple. In The Buildings of Scotland: Edinburgh, it is suggested that this portico may have formed part of a gate to the forecourt of the house. If so, it may have been made by Alexander McGill, to a design by John Erskine, Earl of Mar. It was incorporated into the temple, which was again to the design of one of the Adam brothers. A Latin inscription on the temple, again from Horace, can be translated as "live happy while you can among joyful things". The structure was burned by vandals in the early 1970s, and in 1977 the upper storey was removed as a hazard to aviation, following the development of a new longer runway at nearby Edinburgh Airport. The remaining storey was renovated, and now forms part of a private house.
In 1818 Hope-Weir's grandson James Hope-Vere (1785–1843) asked Thomas Brown to provide designs for an attic extension, although this was never carried out. Ten years later, William Burn was commissioned to design a new north wing, incorporating a dining room, with new kitchens below and bedrooms above. The front of this extension was topped by a pediment matching Bruce's original, complete with pineapples, although this too was removed in the 1950s. The rear is bowed, with a curved stair led down to the garden at the rear. Plans for a matching wing to the south were never carried out. Burn also remodelled the interior, creating a large drawing room from the rooms of the south apartment.
James' son William (1824–1916) commissioned David Bryce to design a further northern extension in 1853, forming a servant's range, and to remodel some of the interiors. William also rebuilt the 18th century stable court and clock tower between 1843 and 1872. It was William's son Colonel James Hope-Vere (1858–1933) who sold the estate, upon his father's death in 1916, to the Earl of Rosebery for £85,0000.
Lord Rosebery had purchased Craigiehall as a home for his second son Neil Primrose MP, who was killed in Gaza during the First World War. In 1926 Rosebery therefore decided to lease the house and policies, although the agricultural lands continue to be farmed as part of Lord Rosebery's neighbouring Dalmeny estate. The lease was taken by Mr James Morton, an Edinburgh textile manufacturer, who commissioned Robert Lorimer to make various alterations, the property having stood empty for ten years. Lorimer added the oriel window on the south front, and modernised many of Bruce's remaining interiors. A water turbine was constructed in the bath house to provide electricity.
In 1933 Craigiehall was re-let to Ernest Thompson, who turned Craigiehall into the Riverside Hotel and Country Club. Thompson operated the 25-room hotel and golf course successfully until 1939, when Craigiehall, like many other country houses, was requisitioned for the use of the armed forces.
Various regiments were stationed at Craigiehall Camp during the Second World War, including Royal Artillery, Royal Signals, and anti-aircraft units. On 12 May 1945, the surrender of German forces in Norway was negotiated and signed at Craigiehall. A rumour, related in Major Innes' book, states that Rudolf Hess was brought to Craigiehall after he flew to Scotland in 1941 to contact the Duke of Hamilton. This rumour is based on a photograph of Hess supposedly once on display at Craigiehall, although the story is not corroborated.
After the war, Ernest Thompson exercised an option of his lease allowing him to buy Craigiehall from Lord Rosebery. However, the army had still not moved out, and in 1948 offered to purchase the property from Thompson, finally completing the sale in 1951. Through the early 1950s the Army made alterations to Craigiehall. The original roof was replaced in 1953 due to woodworm, and extra rooms added in the attic. This resulted in the loss of Bruce's chimneys, and Burn's dining room pediment. Internally the house was redecorated, it being considered that there was too little of the original scheme remaining to allow restoration. Another extension was added, this time to the north-west, to house the staff of the General Officer Commanding-in-Chief (GOC) in Scotland.
Elsewhere on the Camp, the Army began replacing the wartime Nissen huts with more permanent structures. New barracks opened in 1955, and the Headquarters of the Army in Scotland arrived the same year from Edinburgh Castle. Further land was purchased from Lord Rosebery and married quarters were built close to the river. In 1966, a purpose-built office block, by architects Bowhill Gibson and Laing, was constructed within the walled garden, and named Annandale Block in honour of the builder of Craigiehall. Craigiehall Camp was also the site of a Cold War Anti-Aircraft Operations Room, built in the 1950s.
Following restructuring, the army in Scotland became part of the 2nd Division, whose headquarters moved to Craigiehall Camp from York. Craigiehall itself was formerly the HQ of the Black Watch regiment, and now serves as the Officers' Mess for the camp. As of 2007, around 250 people, including civilian and military personnel, are employed at Craigiehall. In March 2007, the Ministry of Defence announced plans for a new headquarters building at Craigiehall. Under the plans, the existing Annandale Block would be demolished, and the walled garden in which it stands would be restored. The new building was to be constructed elsewhere on the grounds, and was granted planning permission in September 2007. On 14 December 2007, defence ministers from eight NATO countries met at Craigiehall to discuss the role of NATO troops involved in Afghanistan. Among the ministers attending were Des Browne from the UK, Robert Gates from the US, and Joel Fitzgibbon from Australia. A protest march was organised, attracting around 30 demonstrators.
In July 2011, following a Defence Basing Review carried out by the Ministry of Defence, it was announced that Craigiehall, along with Dreghorn Barracks and Redford Barracks also in Edinburgh, would be closing in 2014–2015. The review proposed a single UK Support Command, based at Aldershot, to replace three existing divisional headquarters including HQ 2nd Division, based at Craigiehall, which would be disbanded in 2012. Other units at Craigiehall would form part of a new multi-role brigade to be based at Kirknewton. Craigiehall Camp would be earmarked for disposal. Although plans to develop Kirknewton as an Army barracks were scrapped in March 2013, in early 2016, the UK Government announced that the site was one of 12 that will be sold as part of the strategy for the MOD estate. No date for the sale was given. In 2014 Army Headquarters Scotland was merged with 51st Infantry Brigade at Forthside Barracks, Stirling.
In November 2016 the Ministry of Defence announced that the site would close in 2018.