Stonehaven is set on the East coast of Scotland , on the Highland Boundary Fault. The "pudding stone" conglomerate can be seen in the cliffs around the harbour, and has left the promontory on which the castle ruins now stand.

The town's history is inextricably linked to the castle. St Ninian may have founded a chapel on the rock at Dunnottar in c400AD, and there was certainly a church there dedicated to him in 1297 when William Wallace besieged the castle. At that time the English occupied the fortress as Edward occupied the country. "The garrison took refuge in the chapel, but their lives were not spared. Wallace in fyr gert set all haistely, Brynt wp the kyrk, and all that was tharin." [Blind Harry (Jamieson) p162]   The castle was rebuilt, and in 1395 the Pope ordered an investigation into building of a fortalice on the sacred ground there. This lead to Sir William Keith, the first Earl Marischal, being excommunicated but his sentence was later reduced. Mary Queen of Scots visited the castle in 1562.

The oldest building in Stonehaven is the Tolbooth. It seems to have been a storehouse for the castle up to 1600 when it became a courthouse and prison, and after the 1745 Jacobite rising secret baptisms were dispensed from one of its windows. Eventually, the dilapidated building was restored by the Council, and Queen Elizabeth the Queen Mother re-opened it in 1963. The upstairs is now a restaurant, and downstairs a museum.

James Graham, Marquis of Montrose switched sides to lead the Royalists against the Covenanters, and the Earl Marischal shut himself up in the castle and left his tenants to their fate. Montrose burned every house, barn, stable and even ship in Dunnottar and Fetteresso in 1645, and with the occupants left weeping in the street. King Charles I of England was later defeated, and Montrose fled by boat from Stonehaven to exile in Norway . The honours of Scotland were hidden in Dunnottar Castle in 1651-2, and then smuggled out as Oliver Cromwell's roundhead army laid siege. The castle held out for eight months with the English camped on Black Hill (where the 1923 War Memorial now stands), but eventually the bombardment reduced the garrison to a handful of men who were forced to surrender. The governor was George Ogilvy of Barras and his fine 17th century house can still be seen at 51 High Street in Old Stonehaven.

Not everyone thought Stonehaven was a grand place. "At the foot of this pavement (the old road from Aberdeen ) there is a small harbour which they call Steenhive, but I take the liberty to call it stinking hive because it is so unsavoury; which serves only for pirates and picaroons (rogues); but it bravely accommodates the Highlander for depredations." [Frank (1656)]