The name Drottningholm (literally meaning "Queen's islet") came from the original renaissance building designed by Willem Boy, a stone palace built by John III of Sweden in 1580 for his wife Queen Katarina Jagellonica. This palace was preceded by a royal mansion called Torvesund. Hedwig Eleonora bought the castle in 1661, a year after her role as Queen of Sweden ended, but it burnt to the ground on 30 December that same year. Hedwig hired the famous Swedish architect Nicodemus Tessin the Elder to design and rebuild the castle. In 1662 work began on the reconstruction of the building. With the castle almost complete, Nicodemus died in 1681. His son Nicodemus Tessin the Younger continued his work and completed the elaborate interior designs.
During the period of the reconstruction, Hedwig was head of the protectorate for the still underage King, Charles XI of Sweden. Sweden had grown to be a powerful country after the Peace of Westphalia. The position of the queen, essentially the ruler of Sweden, demanded an impressive residence located conveniently close to Stockholm.
The palace was given as a gift to the then Princess, later Queen, of Sweden, Louisa Ulrika of Prussia in 1744 when she married Adolf Frederick of Sweden, who became King of Sweden in 1751. During Louisa's ownership of Drottningholm the interior of the palace was transformed in a more sophisticated French rococo style. Louisa was also responsible for having the Drottningholm Palace Theatre rebuilt in a grand style after the more modest original building burnt down in 1762. In 1777, Louisa sold Drottningholm to the Swedish state. While it was owned by the Swedish state, Gustav III of Sweden, son of Louisa, lived in the palace.
For much of the 19th century, the palace was ignored and started to decay. This saw some change during the reign of Oscar I of Sweden. In 1907 a major restoration of the palace was carried out.
The current Swedish royal family have used Drottningholm as their primary residence since 1981. Since then the Palace has also been guarded by the Swedish Military in the same fashion as Stockholm Palace.