Archaeological materials found at the prehistoric burial ground called Mišinac, at the foot of Kastav, testify to the earliest era of human habitation. The artefacts found there include ceramic pottery, bronze buckles and pendants, buttons, etc.
The wider Kastavština lost some of its importance during Antiquity, but in the Middle Ages, when it was settled by the Slavs, it once more became a place of interest to the landed nobility. After union of Croatia and Hungary, the Kastav area belonged to the counts of Duino (in the vicinity of Trieste), but after the latter no longer had heirs, their estates were inherited by the Walsee counts. The Kastav Law Code was written during their reign in 1400. Only subsequent transcriptions of it have been preserved, but it is assumed that it was written in the Croatian language and Glagolitic script. This is a document rooted in common law that regulates the rights and duties of residents of the Kastav Estate. It was supplemented and appended over time and it was acknowledged by Kastav’s rulers, as shown by an imperial diploma that grants Kastav citizens the right to elect judges and delegates.
Use of the Glagolitic script in the Kastavština was widespread even in the late Middle Ages and Early Modern era, as indicated by the engraved Glagolitic letters found on a fragment of a bell from the steeple on St. Victor’s Church below Kastav and on stone blocks and door frames.
Kastav’s citizens were very dissatisfied by the arrival of the Jesuits in the 17th century due to the additional tithes imposed upon them. Construction of the Church of St. Mary began in Kastav; today it is known by the name Crekvina (‘big church’), and many legends are associated with it. The church was never completed due to the dissolution of the Jesuit order. It has been preserved in its unfinished state and is today one of the town’s most attractive sights. After the fall of the Napoleonic empire, Kastav came under Austrian rule, and in 1848 feudalism and the Kastav Estate were abolished.
The town of Kastav is notable for many educational and cultural activities, the beginnings of which can be traced back to the establishment of the Primary School in 1770 by decree of Empress Maria Theresa that made the schooling of children mandatory. It was initially open only to boys, but later girls were also allowed to attend. The Croatian language and culture were promoted in Kastav after the establishment of the Reading Room in 1866. Education continued to develop in Kastav, so that a teacher induction school began working in 1875, while the Teacher Training College was established in 1906; the Trade School was opened in 1885.
Cultural and educational activities were also carried out by associations such as Istrian Faerie from Kastav, Patriot from Rukavac and St. Michael from Rubeši. They fostered the Croatian language, literature, culture and learning.
The town of Kastav is associated with the trinity of Istrian national reformers, Matko Mandić, Matko Laginja and Vjekoslav Spinčić. The famed writer Vladimir Nazor spent the early years of the 20th century in Kastav, working as the superintendant of the Teacher Training College.
After the First World War, the western section of the former Kastav Municipality was annexed to the Kingdom of Italy under the Treaty of Rapallo in 1920 and then the Treaty of Rome in 1924. It remained a part of Italy until the end of World War II in 1945.
The everyday life and economic activities of the local population at the end of the 19th and in the 20th century are presented in thematic exhibitions.