The history of the city begins with the construction of the now-ruined castle by Graf Siegfried of Luxembourg in 964. It received its town charter in 1291. The city has a bellfoundry, the Glockengießerei Mabilion, which has been in operation since the 1770s, and as of 2003[update] the only one in Germany that makes bronze bells.
In 1945 to 1948 Saarburg was occupied by troops from Luxembourg. From 18 July 1946 to 6 June 1947 Onsdorf, in its then municipal boundary, formed part of the Saar Protectorate. French troops complemented the occupation until 1955.