The town already existed in the Middle Ages, but information on it is scarce, it is likely that it was a small village. The word salgó means "shining" in Old Hungarian, while Tarján was the name of one of the Hungarian tribes conquering the area.
The castle of Salgó was built in the 13th century on a mountain of volcanic origin. In the 13th century the town already had a church.
After the siege of the nearby Castle of Fiľakovo (1682) the town was deserted, and new settlers arrived only ten years later, but remained a small village.
Development came in the mid-19th century, when a coal mine was opened nearby. The job opportunities provided by the mine and the developing industry began to attract people. The village grew quickly and was granted town status in 1922. Today visitors can see the remains of the mining industry by visiting the Mine Museum, which is located next to the main entrance of the mine.
In 1950, Salgótarján became the capital of Nógrád county instead of the previous county seat Balassagyarmat. In the next twenty years several villages were annexed to the growing city.
The coal mines have been closed years ago, leaving the city with high unemployment rates.
In 1994, Salgótarján was granted the rank of city with county rights, in accord with a new law stating that all county seats are cities with county rights. (Previously only cities with a population over 50.000 were granted county rights, and Salgótarján was one of only two county seats that had smaller population than 50.000; the other was Szekszárd).