The first records of the village of Sosnowiec date back to 1727. The name Sosnowiec comes from pine forests originally growing in these areas. As a result of the third partition of Poland, the village was incorporated into Prussia. It was there that the borders of the three partitions met forming the triangle of the three emperors between the Czarna Przemsza and the Biała Przemsza Rivers. It became  part of the Duchy of Warsaw in 1807 and of Congress Poland (the Kingdom of Poland) in 1815. In the 19th century new deposits of hard bituminous coal were discovered. In 1859 a railway station was built with a branch of Warsaw – Vienna Railway. Consequently, the village started to develop. The areas attracted industrialists from western countries. Due to the dynamic growth, Sosnowiec was granted a charter in 1902. 

The outbreak of World War I stopped the development of the town. Many mines and industrial factories were damaged. Workers were sent to Germany to forced labor.

Despite many losses after World War I the industry of Sosnowiec began to develop again. In 1927 the town became the seat of the Chamber of Commerce and Industry. In 1928 the first tram line was opened to connect Sosnowiec with Będzin and Dąbrowa Górnicza.
It was at that time that the so-called "market halls of development" originated (Polish Trade Support Society), which meant to be competitive to Jewish trade.

On 4 September 1939 the German army entered Sosnowiec. As early as on the first day, the Nazis carried out public and single executions during which several dozens of people, both the Poles and the Jews, died. In March 1940 a temporary camp was established in former shop floors of Schoen Factory in 1 Maja Street. The camp was later changed into the police prison. In April and May the Germans carried out “Intelligenzaktion” during which engineers, teachers, technicians and clerks were arrested. Some of them never came back home and only few managed to survive the concentration camp in Dachau. On 27 January 1945 the town was liberated by the Soviet Army.