It is the monarch's official residence in Scotland, used for state occasions, investitures and garden parties, and the historic and state apartments can be visited all year, apart from the periods when the royal family is in residence. Public access is run by the Royal Collection Trust.

David I founded the abbey in 1128, after a vision according to legend; James II was born at the abbey and was also crowned, married and buried in it. James IV built the first palace beside it from 1501, and James V added the great tower with rounded corners at the north-west in 1528–36, the oldest part still standing. The rest of the palace was rebuilt for Charles II between 1671 and 1678 to designs by Sir William Bruce, who balanced the old tower with a matching one at the south-west and set a classical courtyard behind, its arcades decorated with Doric, Ionic and Corinthian pilasters floor by floor.

The best-known rooms are in James V's Tower. Mary, Queen of Scots lived on its second floor from 1561 to 1567; in her outer chamber she held her audiences with John Knox, and in March 1566 her secretary David Rizzio was dragged from her supper table and stabbed to death there, where a stain said to be his blood is still pointed out. Her bedchamber keeps an oak ceiling from her time, and the rooms display Stuart and Jacobite relics, among them a piece of embroidery, sewn while she was held in England, in which a cat watches a mouse. A narrow spiral stair links her rooms with the floor below, where Bonnie Prince Charlie slept in 1745 in the bed now called the Darnley bed.

The State Apartments built for Charles II are reached by the Great Stair, beneath a Baroque plaster ceiling on which angels carry the Honours of Scotland. The route leads through the Royal Dining Room, the Throne Room, where a pair of throne chairs for George V and his queen has stood on the dais since 1911, and drawing rooms with 17th-century plaster ceilings and French tapestries showing the story of Diana, to the King's Bedchamber, which has the most elaborate ceiling of all. The Great Gallery, 45 metres long, is hung with 96 of Jacob de Wet's portraits of the Scottish kings, real and legendary, painted in 1684–86; Bonnie Prince Charlie held balls here in 1745.

Outside, the gardens cover about 10 acres and were laid out in their present form after Prince Albert took an interest in them in 1857. Features to find include the sundial carved by John Mylne in 1633 and the small 16th-century building known as Queen Mary's Bath House. The forecourt fountain of 1858 is modelled on the one at Linlithgow Palace, and the King's Gallery at the palace entrance shows works of art from the Royal Collection.