The settlement was built in connection with the Benedictineabbey of Hagenrode in the Selke valley, to which King Otto III granted market, minting and customs rights in 993. The following year the place was mentioned as Hazacanroth. It lost its minting rights by the 11th century, but its town rights were renewed in 1338.
With the renewed establishment Anhalt sovereignty in 1535, the town became the administrative centre of the double Amt for Harzgerode and Güntersberge. The town was the residence of the principality of Anhalt-Bernburg-Harzgerode from 1635 to 1709. The seat of the princes was the Harzgerode castle, built in the middle of the 16th century.
Due to its protected location the town did not suffer from many military conflicts, but it was repeatedly devastated by fire. Before 1503 there was a great conflagration. In 1635 (on Midsummer's Day) every building in the town was razed with the exception of seven houses. On 30 June 1722 42 houses burned down. On 23 October 1817 52 houses were razed.