Possibly built on the foundations of a Roman castrum fortress, the castle was first documented in a 1191 deed. It was seized by the Prince-Archbishops of Salzburg about 1285 and from the 14th century onwards served as the residence of an episcopal burgrave. Under the rule of Prince-Archbishop Leonhard von Keutschach from 1495, the castle was rebuilt and extended. In 1520 it became an administrative seat of the Lungau region and was besieged during the German Peasants' War of 1524–25. Archbishop Wolf Dietrich Raitenau stayed here on his flight from Salzburg in October 1611, shortly before he was captured.
Archbishop Count Hieronymus von Colloredo dissolved the Moosham bailiwick in 1790, whereafter the castle decayed. In 1886 the Austrian explorer and patron of the arts Count Johann Nepomuk Wilczek purchased the ruin and had it restored. Up to today the complex is a private property, though its rooms featuring Wilczek's extensive art collection are accessible to the public.
This article was initially translated from the German Wikipedia.