The history of Košice–Bohumín Railway track dates back to as early as the 19th century when the only railway lines within the Kingdom of Hungary were the steam-powered Vienna–Pest–Debrecen railway and the horse-drawn Bratislava–Trnava railway. As early as 1839 the Diet of Hungary debated an Act which may be considered to be the foundations of Hungarian traffic policy. The project of the construction of a track that would connect Silesia via Jablunkov, Žilina, Liptovský Mikuláš, Poprad, Spišská Nová Ves, and Košice, led to a first real design to be implemented that dates back to 1864. The railway was intended to speed up the transport of iron ore from deposits in Spiš and Gemer to the Třinec ironworks, to make it more effective. It was also expected to provide the same benefits to the transportation of coal from the Silesian mines to northern and eastern Hungary. The initial works finally began on October 15, 1867. However, the construction was suspended or postponed several times due to financial problems, until the situation finally improved with the involvement of a new investor, the Anglo-Austrian Bank. The Košice–Kysak–Prešov section was completed first and put into operation on September 1, 1870. Further sections followed in 1871, and the last section, Spišská Nová Ves – Kysak, was put into service on March 12, 1972. The entire line from Bohuním to Košice went into regular operation, with a single pair of mixed trains, on March 18, 1872.
On March 18, 2022, so 150 years later, Czech Republic and Slovakia celebrate this date with a souvenir sheet showing nicelly designed steam machines (twin issue with one stamp and two labels). The background of the souvenir sheet shows an older map depicting the railway line.