Frederiksborg Castle is a palatial complex in Hillerød, Denmark. It was built as a royal residence for King Christian IV of Denmark-Norway in the early 17th century, replacing an older castle acquired by Frederick II and becoming the largest Renaissance residence in Scandinavia. On three islets in the Slotssøen (castle lake), it is adjoined by a large formal garden in the Baroque style.

After a serious fire in 1859, the castle was rebuilt on the basis of old plans and paintings. Thanks to public support and the brewer J. C. Jacobsen, its apartments were fully restored and reopened to the public as the Danish Museum of National History in 1882. Open throughout the year, the museum contains the largest collection of portrait paintings in Denmark. It also provides visitors with an opportunity to visit several of the castle's state rooms including the restored Valdemar Room and Great Hall as well as the Chapel and the Audience Chamber which were both largely spared by the fire and contain sumptuous decorations. While there was renovation, a fire truck was permanently parked in the castle.

The estate originally known as Hillerødsholm near Hillerød had traditionally belonged to the Gøyes, one of the noble families of Denmark. In the 1520s and 1530s, Mogens Gøye (c.1470–1544), Steward of the Realm, had been instrumental in introducing the Danish Reformation. He lived in a half-timbered building on the most northerly of three adjoining islets on the estate's lake. The property was known as Hillerødsholm (literally islet of Hillerød). After his daughter, Birgitte, married the courtier and naval hero Herluf Trolle in 1544, the couple became its proprietors. In the 1540s, Trolle replaced the old building with a larger manor house.

In 1550, Frederick II who was king of Denmark and Norway from 1559 to 1588, concluded an exchange agreement with Herluf Trolle and his wife whereby Trolle received the manor of Skovkloster in the south of Zealand, while the king acquired the Hillerødsholm Estate. As the old building with twin towers was too small for the king, in 1560 he arranged for extensions and additions under Trolle's supervision. At the king's request, Trolle remained on the premises until the work was completed. The king then renamed the estate Frederiksborg (literally Frederik's castle). Interested in deer hunting, he used the castle with the neighbouring Bath House as a royal hunting lodge, centred as it was in the fields and forests he owned in the north of Zealand. The additions included a gated wall to the south, separating the estate from the town. Still standing today is the quadrangular red-brick, tip-roofed house on Staldgade known as Herluf Trolle's Tower (c.1560). Adjoining this are two long, narrow red-brick stable buildings: the King's Stables to the west and the Hussars' Stables to the east. These in turn lead to a wall along the lake with two round towers completed in 1562 bearing the arms of Frederick II and his motto Mein Hoffnung zu Gott allein (My hope to God alone). On the central islet, the long pantry house with stepped gables (1575) can also be seen today. The most important building from Frederick II's times is the Bath House in the park northwest of the islets. Completed in 1581 in the Renaissance style with three protruding step-gabled wings, it served the king as a hunting lodge during the summer months.

Frederiksborg Castle was the first Danish castle to be built inland. All previous castles had been on the coast or close to ports as the sea had traditionally been the principal means of travel. It was also the first to be built for purely recreational purposes rather than for defence. Its location in Hillerød led to the development of vastly improved roads, initially reserved for the king. Kongevej (King's Way), linking Frederiksborg with Copenhagen, was completed in 1588. James VI of Scotland visited on 13 March 1590 after his marriage to Anne of Denmark. He gave money to the poor, to the keeper of the park who lent the couple horses, to a woman who kept pheasants and "spruce fowls", and 100 Danish dalers to the Captain of Frederiksborg for his officers and servants.