In 1772 Chełmek was annexed by the Habsburg Empire, and made part of Galicia. The village was located right on the border between Prussian Silesia, and Austrian Galicia. It was regained by Poles as a result of the Austro-Polish War in 1809 and became part of the short-lived Polish Duchy of Warsaw, and after its dissolution in 1815, it became part of Chrzanów District of the Free City of Kraków. In November 1846, the Free City was annexed by Austria, and in 1856, rail line from Kraków to Vienna, via Chełmek was constructed. In the late 19th century, it had a population of 1,094. After World War I, in 1918, Poland regained independence, and in the Second Polish Republic, Chełmek belonged to the Kraków Voivodeship, and due to proximity of the Silesian border, its residents helped Polish insurgents in Silesia (see Silesian Uprisings).