The castle was built at the site of the prehistoric hillfort in the former village Stari Grad (Old Town). The site was first mentioned in documents in 872, and in 950 when Byzantine Emperor Constantine VII Porfirogenet confirmed the presence of Slavs in these villages. In 1260, has passed into the possession of vassals of the Counts of Gorizia, the Austrian noble family Schönberg by which it got its name. Among the signatories of the peace treaty in 1274 between the Aquleia patriarch Raimondo della Torre and the Count of Gorizia Albert I, there was Teodorich de Sumberg. As a vassal of Gorizia Count Albert III, Dietrich von Schonberg in 1341 attack and plundered the countryside of Venetian Motovun. Since 1367, when counts of Gorizia became extinct, was inherited by Habsburg family and was part of the Pazin County.