The site was first mentioned in in a 860 deed issued by King Louis the German of East Francia, donating several of his properties in the former Principality of Carantania to the Archdiocese of Salzburg. It was then named as ‘Astarwiza’, its name being of Slavic origin. In the 11th century Archbishop Gebhard of Salzburg ceded the castle to the Dukes of Carinthia from the noble House of Sponheim in return for their support during the Investiture Controversy. The Sponheim dukes bestowed the fiefdom upon the family of Osterwitz, who held the hereditary office of the cup-bearer in 1209. In his book Change the Austro-American psychologist Paul Watzlawick renders a popular tale of the siege of the castle by the troops of Margarete Maultasch ("Mouth Bag"), Countess of Tyrol from 1335 to 1363. According to legend first noted by the medieval chronicler Jakob Unrest and later by Jacob Grimm, Margarete, cheated by the House of Habsburg of her inheritance claims to Carinthia, invaded the duchy; her forces were however deceived and withdrew when the garrison of Hochosterwitz slaughtered its very last ox, filled it with corn and threw it over the wall, pretending it still had so many provisions in stock that they could be used as projectiles.
In the 15th century, the last Carinthian cup-bearer, Georg of Osterwitz was captured in a Turkish invasion and died in 1476 in prison without leaving descendants. Hans, cup-bearer of Osterwitz was the last remaining survivor of the family. He had a substantial debt owing to the Emperor and was forced to give up the deeds of the castle to pay his debt. So after four centuries, on 30 May 1478, the possession of the castle reverted to Emperor Frederick III of Habsburg.
Over the next thirty years the castle was badly damaged by numerous Turkish campaigns. On 5 October 1509, Emperor Maximilian I handed the castle as a pledge to Matthäus Lang von Wellenburg, then Bishop of Gurk. Bishop Lang undertook a substantial renovation