Auerbach Castle is one of several fortresses along the Bergstrasse in southern Hesse, Germany. The castle was originally built by King Charlemagne (Emperor of the Holy Roman Empire) and rebuilt by Count Diether IV of the Katzenelnbogen dynasty in the second quarter of the 13th century. Today it remains standing atop a hill known as (part of the Melibokus) above the town of Bensheim-Auerbach.
The town of Auerbach (Bensheim) was mentioned for the first time in the Lorsch codex as "Urbach". Through the marriage of Hildegard von Henneberg, areas of the Bergstraße passed to Henry II of Katzenelnbogen in 1135. Henry was ennobled as an earl in 1138 by King Konrad III. At that time, Auerbach belonged to the County of Katzenelnbogen. Katzenelnbogen was sub-divided into the Lower County (around St. Goar on the Rhine) and the Upper County (in what is now southern Hesse, south of the Main).
A stronghold was needed to provide security for the southern Katzenelnbogen dynasty; this included protection of the duties (tolls) collected at the town of Zwingenberg from travellers using the well-known north-south trading route along the Roman mountain road (Strada Montana, or Bergstrasse in German). Auerbach Castle was built on the strategically important Auerberg (Urberg) hill to address this need. Construction of the castle is believed to have begun about 1222 by the order of Earl Diether IV von Katzenelnbogen. The earliest mention of a castle on Urberg in the historical record appears in 1247, and the first document of the castle itself dates from 1257. In 1479 County Katzenelnbogen (including Auerbach Castle) passed to the Landgraviate of Hesse.