Dalkeith Castle was located to the northeast of Dalkeith, and was originally in the hands of the Grahams and given to the Douglas family in the early 14th Century. James Douglas of Dalkeith became the Earl of Morton in the mid 15th century. In 1543, Cardinal Beaton was imprisoned in Dalkeith Castle. It was forced open and destroyed by the English in 1547, and in 1575 James, 4th Earl of Morton, built his palace which was visited by James VI in 1617. In 1642 the Buccleuch family bought Dalkeith and its estates.
The palace was again rebuilt between 1701-11 as Dalkeith House by architect James Smith, under the guidance of Anne, Duchess of Buccleuch and incorporating remnants of the original castle. It is said to have been modelled on William of Orange¿s palace in the Netherlands. Internally, extensive use is made of marble, which was very much the taste of the Duchess. Minor additions were carried out by John Adam (1762) and James Playfair (1786). Prince Charles Edward Stuart stayed two nights at Dalkeith House in 1745, King George IV slept here during his visit to Edinburgh in 1822 as did Queen Victoria in 1842. The Dukes of Buccleuch ceased to live in this house in 1913.
Today, the Duke of Buccleuch maintains houses at Bowhill (the principal family residence), Branxholme and Drumlanrig, while Dalkeith House is leased to the University of Wisconsin (USA) as a European study centre and accommodates approximately 80 students. The surrounding estate is now managed as part of the Bowhill Estate.