The beginning of the construction of the Chęciny castle probably took place at the end of the 13th century, in order to protect the nearby mining settlements, perhaps from the foundation of Wenceslaus II, the Czech king of the Přemyslid dynasty, and in the years 1300 – 1305 also the ruler of Poland. It is known that it existed already in 1306, when Władysław the Elbow-High gave it to the Kraków bishop Jan Muskat. The takeover of the castle probably did not happen, as in 1308, the starost of Chęciny – Wacław, appeared in the documents. During the reign of King Casimir the Great, or even more probably during the reign of Władysław the Elbow-high, who between 1306 and 1325 founded the town of Chęciny and visited the castle many times, the initially small stronghold was thoroughly rebuilt.
In the 14th and 15th centuries, the castle served as an important administrative and military center. Councils of noblemen and knights were held here, castle played an important role as a place of concentration of troops heading for war with the Teutonic Knights. Due to the inaccessibility of the castle, the treasury of the archdiocese of Gniezno was deposited here. Namely, on the eve of All Saints Day in 1318, the Archbishop of Gniezno, Janisław, with the consent of King Władysław the Elbow-High, deposited the utensils of his church in Chęciny, due to the threat of war with the Teutonic Knights. During the reign of Casimir the Great, for many years it was used as a state prison. They were imprisoned here, among others, more important prisoners captured after the battle of Grunwald and Koronowo, including Michael Küchmeister – the Grand Master of the Teutonic Order. Andrzej Garbaty, a half-brother and a fierce enemy of king Władysław Jagiełło and Hińcza of Rogowo spent as prison 10 years in the castle, as an chronicler Jan Długosz wrote, “thrown into the dirty tower in Chęciny, he almost died from the stench in prison.” The castle was also the residence of the queens and widows: Adelaide, the second wife of king Casimir the Great, Jadwiga, later mother of Louis I, Queen of Hungary, and Elisabeth, the sister of the king, who ruled in the name of his son, Louis I of Hungary. During the plague raging in 1425, Jagiełło’s son, Władysław, found shelter in the castle walls.
Over the centuries, the appearance of the castle has changed, although the works from the fourteenth and fifteenth centuries were rather gradual extensions and repairs, during which, among others, the lower ward and the so-called Great House in the upper ward were built. The early modern construction activity of the starosts Stanisław and Hieronim Szafraniec, led around the middle of the 16th century to the erection of arcades surrounding the upper awrd, the extension of the facade of the gate, the adaptation of the original keep to the economic function (bakery), or the reconstruction of the kitchen. In 1540, the works on cleaning and lining the well were recorded. This lasted for two years, because the hired miners refused to work due to the huge stench coming from the pit, where dogs, pigs and other farm animals had drowned. Despite the cleaning of the well, the report on the account from 1569 already mentioned the need to repair the castle and the related difficulties resulting from the lack of water.
In 1607, the castle was conquered and ruined during the Zebrzydowski rebellion. Soon, however, repairs were started on the initiative of the starost Stanislaus of Ruszcza Branicki, who rebuilt the stronghold in the Renaissance style. In 1657, the castle was ravaged by Rákóczi’s army, but later it was still used by the staroste. The next, Swedish destruction in 1707 was already so serious, that the castle was finally abandoned in the eighteenth century.