Kozjak Castle (Slovene: Grad Kozjak, German: Schloss Kosieck) is a 13th-century castle ruin on a rocky hill above the village of Dolenje Selce near the town of Dobrnič, part of the Municipality of Trebnje in Lower Carniola, Slovenia.
Though his family ransomed him after a year for the sum of 2000 guilders, he died soon after his return, having allegedly been poisoned by his captors.
Around 1689, the castle was bought by prince Franz Ferdinand Auersperg, who merged its estate with Šumberk.
After World War II, Ivan Komelj described it only as a "completely overgrown pile of rocks."
The first known depiction of the castle is an etching in Valvasor's 1689 The Glory of the Duchy of Carniola, which portrays it as a two-story building of rectangular layout and with a sizeable extension on the south side.