The palace was originally built in 1640 for Jacob De la Gardie, the Constable of Realm. It was named after him, Jacobsdal but it was later changed to Ulriksdal.
In 1650 Queen Christina was coronated and her procession actually began at Ulriksdal and ended at the Royal Palace in Stockholm. Apparently the procession was so long that as the first carriage arrived at the palace in Stockholm, the last one had not left Ulriksdal.
The name Jacobsdal was shortlived because in 1669 the Queen Dowager Elenora purchased the palace from Jacob’s son. She later gifted it to her grandson and had it renamed after him, Ulriksdal.
A few years after the Russo-Swedish war (1808-1809), the palace ceased being a royal residence as it was used as a veterans hospital from 1822-1849. The cemetery is actually located on the walk in the area behind the Kungshamra housing. After its stint as a hospital many of the 18th century interiors no longer existed. It did become a royal residence once again but it needed extensive redecorating.
The palace is no longer lived in and has been open to the public since 1986. However, it is currently closed due to the current climate.