A formal design is shown on the 1750 map although the natural landscape features provided the structure for the design and for the late 18th century informal layout. Many architects have been involved in designing buildings in the policies, and W.S. Gilpin is known to have prepared a plan in 1832 and to have designed the formal Conservatory garden.
In its early history, Dalkeith Castle was the stronghold of the Douglases of Dalkeith who retained it until the time of the 1st Earl of Morton, James Douglas, who, after enlarging the building, made arrangements to sell it to Charles I, one of many royal visitors to Dalkeith over the centuries. When these plans fell through, the castle was sold to Francis Scott, 2nd Earl of Buccleuch in 1642. During Cromwell's interregnum (1649-1660) General George Monck, later Duke of Albemarle, was put in command of events in Scotland, basing himself at Dalkeith where he also planned the Restoration of the Monarchy. The 2nd Earl of Buccleuch died in 1651 and was succeeded by his two daughters. The younger, Anne, married the Duke of Monmouth, natural son of Charles II. He assumed the name of Scott and they were created Duke and Duchess of Buccleuch in 1663. The Duke led a rebellion against his uncle for which he was beheaded in 1685 after which the Duchess stayed in London for many years, deciding to move back to look after her Scottish estates in c.1701. The Buccleuch Estates had been managed in the Duchess' absence by George, 1st Earl of Melville. She had the present house, or Palace as it was then known, built to the designs of the architect James Smith. The Palace incorporated parts of the Castle which is shown in a drawing by John Slezer of c.1690. The Duchess lived until the age of 81 and made vast improvements to the house and its decoration. Defoe visited in 1720 and described waterworks, fountains, a canal designed but not completed, and fine avenues in the course of planting. Her grandson, Francis, inherited in 1726, and was in turn succeeded by his grandson, Henry, in 1751.
The 3rd Duke was aged only five when he inherited but lived for many years at Dalkeith after benefitting from the wise tutorship of Adam Smith, the celebrated economist, overseeing most of the changes in the designed landscape from its early formal layout to the picturesque. He swept away the forecourt in 1769, replacing it with the oval lawn painted by Barret in 1769, who also painted The Hermitage in the Park. The Hermitage has since been lost but the picture survives at Bowhill. The 3rd Duke married Lady Elizabeth Montagu who later inherited the Montagu estates in 1790. The Duke himself inherited some Argyll estates from his mother and all of the Queensberry estates, but Dalkeith remained the family's principal residence until 1918. Amongst other changes made by him in the policies, the Montagu Bridge was erected in 1790 to designs by Robert Adam, after several other designs had been submitted in previous years, including one by Chambers. A Temple was designed by Baxter in 1775, and in 1786 James Playfair added a bow-window and, in 1784, a lodge.
The 3rd Duke died in 1812 and his grandson, Walter Francis, succeeded in 1819 and, despite his youth, found himself acting as host to George IV who moved into Dalkeith House instead of the Palace of Holyroodhouse on his first and only formal visit to Scotland in 1822. He was known as a great improver of his many estates. He consulted William Burn in the 1830s with regard to improvements to the house which were never made, but Burn did carry out minor improvements to the interior. He also drew up the design for the Conservatory, as suggested by W.S. Gilpin in 1832, as the centrepiece for his formal parterre near the River South Esk. Many famous gardeners were employed at Dalkeith, the most famous being Charles McIntosh who worked at Dalkeith in the mid-19th century and who wrote 'The Book of the Garden'. He built and planted out a new kitchen garden to the north of the house which was much admired. In 1850 the gardener, William Thomson, was brought to Dalkeith from Wrotham Park, Hertfordshire. The pinetum was planted in the mid-19th century and the bowling green shown on the 1854 map has been replaced by tennis courts in more recent years. Since World War I, Dalkeith ceased to be the principal residence of the Buccleuchs and, although the house has been leased for business and educational uses, the function of the flower and kitchen gardens has been lost over the years. The park is open as a Country Park and some visitor facilities have been added to it, including the adventure playground.