Bolko I the Strict laid the castle at the end of the 1200s as one link of a border ring against Bohemia; the town grew beneath it on Magdeburg law. In 1524 the Podiebrad dukes moved their capital here, and Benedikt Ried gave them a Renaissance residence with an arcaded courtyard, corner bastions and a drawbridge tower.
The castle outlived sieges by Matthias Corvinus and the Thirty Years' War, then burned in 1728 and 1858 and became a quarry for the burghers; a century later it was conserved as the romantic ruin you walk today. The darker fame came from the 1606 trial, whose broadsheet legend crossed Europe and may have whispered a name to Mary Shelley two centuries on.