In legend, the lands of Keith were granted to Marbhachir Chamuis, in recognition of his valour at the Battle of Barry in 1010; he is the mythological ancestor of the Keith family. The lands of Keith were possessed in the reign of King David I by Simon Fraser of Keith, the first of that surname to appear on record in Scotland. Fraser was one of the Normans who accompanied King David Scotland back to Scotland. Fraser was made Sheriff of Tweeddale. He is recorded in a charter gifting some lands and dedicating a church to the Tironensian Brothers at Kelso Abbey. It is unclear how the policies at Keith were transferred to another Norman, Hervey de Keith the King's Marischal. It is likely that the lands formed part of a dowry. Hervey, certainly held the lands at Keith when he erected a Church there at the end of the 12th century obeying a royal decree to that effect. Latterly Hervey's progeny took their name from their estate as was common at the time Today's parish of Humbie was originally split into the divisions of "Keith Harvey" and "Keith Hundeby" and formed the major part of the estate of the Keiths, until they were granted the rock of Dunnottar in Aberdeenshire at the close of the 14th century. Hervey's descendants were made hereditary Marischal of Scotland in 1176.
16th and 17th centuries
The house was built as an L plan tower before 1589 by George Keith, 5th Earl Marischal on the remainder of a previous construction which is heavily obscured, only just discernible in the massive thickness of the southern ground floor internally. Within the grounds, there is evidence of a Barmekin and earthworks in the adjoining cattle meadow which would indicate a mediaeval or earlier settlement or castleton. George, 5th Earl Marischal, had stood proxy for King James VI during his marriage to Anne of Denmark in August 1589. The roof trusses of the tower are reputed to have been made from timber gifted to him by the Danish King Christian VI for services rendered. King James went to Norway in November 1589 to collect his bride in person, returning the following spring. As they were entering the Firth of Forth, a storm broke out, threatening the royal flotilla. The superstitious James blamed the tempest on witchcraft; this led to the infamous North Berwick Witch trials. Although the coven was reputedly led by Francis Stewart, 1st Earl of Bothwell, one of the leading accused was Agnes Sampson. Sampson was known as the "Wise Wife of Keith" and lived at Nether Keith, some quarter of a mile from the house. Indeed, one of the latest witch trials in Scotland took place at Humbie in 1678. The accused were held within the Chapel at Keith Marischal for the evening prior to their execution, which took place at Dow Syke one mile to the north of the house.
Its sale in the late 17th century to the Earls of Hopetoun, was to see much structural alteration to the building. The Hopes were originally an Edinburgh family with strong links to the law. During the Williamite Revolution the Keiths were attainted as Jacobites. The Earl Marischal was coerced into the redistribution of his properties, Keith Marischal included. The Hope family were engaged in wholesale acquisition of the property of Jacobite sympathisers and eventually managed to amass massive estates in the Lothians over the course of the 18th century. It is they who carried out the quasi-symmetrical extension to the west of the house to construct a new wing, forming a courtyard house. The east wing being the original tower. The walled garden was added in 1807. Before 1889, it was sold to the family of Patrick Fraser Tytler who hired the Edinburgh firm of Peddie and Kinnear to construct an extension that would fill in the courtyard and provide corridors in the building rather than the more archaic passage from room to room. It is at this time that the exterior was baronialised with faux turrets and crawstep gabling to complement those extant. In 1953, the property was acquired by the architect Sir Robert Hogg Matthew; it is currently owned by the Rogers family.
Other buildings
The ruined chapel that stands in the grounds of the House, is a scheduled ancient monument, which is of early Norman Gothic style. The structure is presumably that church that Harvey de Keith raised by decree of King David. There is a 19th-century plaque commemorating this on the chancel gable. Although unsympathetically restored and stabilised in that period as a folly, there is still a wealth of detail that points to its antiquity. These include a fine early 17th-century monument to the Anderson family, spiro-form carvings on the exterior of the Ogee window of possible Rosicrucian significance, and the unidentified tombstone of a crusading knight. It is possible that this is a memorial to Sir William Keith, a companion of Sir James Douglas on his campaign to take the heart of Robert the Bruce to the Holy Land. Upon the failure of that mission Keith brought back the heart of Bruce to Melrose Abbey, and the body of Douglas to St Bride's Church, Douglas.