The castle was built on a crag overlooking the Hirschbach; the first recorded mention of it dates to around 1100. For centuries it was the major centre of power in the Isarwinkel, the region along the Isar between Bad Tölz and Wallgau. The community of log-rafters and craftsmen which grew up below it became Lenggries. The original owners of the Hohenburg were the lords of Thann. Late in the 12th century it came into the possession of the lords of Tölz, and in 1262 passed to the Wittelsbachs. From 1294 it was in the possession of the lords of Egling, then from 1396 of the lords of Maxlrain, who substantially rebuilt and enlarged it in 1410-20. In 1522 it passed to the House of Schellenberg. Finally in 1566 Dionys von Schellenberg sold the castle and fief to his nephew Hanns Paul Herwarth, and they remained in his line until 1800. Until the mid-16th century it remained a defensive castle; there is a legend of a tunnel under the Isar connecting it with the Neuburg on the Brauneck. From 1570 on, rebuilding changed its appearance and gave it characteristics of an aristocratic residence. In 1705 the castle and the town were in the centre of the Bavarian People's Uprising against Austrian occupation; the first resistance was organised there. The uprising ended with Sendling's Night of Murder on Christmas Day in 1705 and the Battle of Aidenbach in January 1706. During the War of the Spanish Succession, the castle was occupied by Austrian troops and on 21 July 1707 a fire of unexplained origins spread to the entire castle within an hour and completely destroyed it. According to Judge Mayr's report to Count Herwarth, the fire broke out at about 10 o'clock in the Great Hall, which was being used as a barracks, and the hussars set up a hue and cry but evacuated the castle rather than attempt to fight it. Their lieutenant objected to the suggestion that his men had caused the fire through drunkenness or carelessness and blamed a dirty, blocked fireplace in the hall; however, several witnesses later said the fireplace had not been the source of the fire. The castle was then mostly demolished, the stones being reused for the parish church and the new Schloss Hohenburg, which was built approximately to the west. Trees that have grown up on the site have further broken up what remains.
Modern times
The site is still heavily wooded. Part of a tower, several ramparts and ruined walls and a well shaft remain of the castle. During the 20th century Romantics and preservationists became aware of the ruin and sought to prevent it from decaying further. A Burgverein—castle association—was founded in 2003, and organised a permanent exhibit at the Lenggries museum that opened in 2007 on the occasion of the 300th anniversary of the castle's destruction. In 2004-06, geodesy experts from the University of the German Federal Armed Forces at Neubiberg near Munich surveyed the site and the ruins with lasers, making it the first castle in Bavaria of which an accurate virtual model exists; this is the centrepiece of the museum display. The association organised an associated clean-up and cleared 24 trees; the once overgrown path up to the castle is now clear, and in 2014 informational signs with photographs were placed along it and a view cleared through the trees from the first stop.