In the 15th and 16th centuries Solec emerged as a local salt trade center. It organized fairs and enjoyed several privileges, confirmed by King Sigismund I the Old. In 1615–1627 Krzysztof Zbaraski rebuilt the castle in Renaissance style and founded a monastery. During the Swedish invasion of Poland (1655–1660) the prosperous town and the castle were completely destroyed - out of 246 houses, only 6 remained after the war. The town began to slowly recover in the 18th century. It was annexed by Austria in the Third Partition of Poland in 1795. In 1809, after the Polish victory in the Austro-Polish War, it was included within the short-lived Polish Duchy of Warsaw, and after its dissolution, in 1815, it passed to Russian-controlled Congress Poland. After the unsuccessful Polish January Uprising Solec was deprived of its town charter (1869), which was restored in 2021. After World War I, in 1918, Poland regained independence and control of the settlement.