Szczekociny was the location of a motte-and-bailey castle from the 13th-14th century, which is now an archaeological site. First mention of Szczekociny comes from 1307. At that time, the village belonged to the Odrowąż noble family. It was administratively located in the Lelów County in the Kraków Voivodeship (14th century – 1795) in the Lesser Poland Province of the Polish Crown. In the late 14th century Szczekociny became the seat of the Odrowąż family, emerging as a local trade and craft center. It was granted town rights in 1398. In the 16th century, the town, together with other locations of Lesser Poland, enjoyed the period of prosperity known as the Polish Golden Age. In the mid-17th century, however, it was completely destroyed by the Swedes, during the Swedish invasion of Poland, and did not recover until the 18th century, when it belonged to the Dembiński family, whose efforts resulted in reconstruction of most buildings. The owners remodelled local parish church and built a palace, which still exists, and which in 1787 hosted King Stanisław August Poniatowski. The Battle of Szczekociny was fought near the town on June 6, 1794, during the Kościuszko Uprising. After the Partitions of Poland, Szczekociny found itself in the Russian-controlled Congress Poland (since 1815).