Magenheim Castle is located in the Heilbronn district in Baden-Württemberg above the municipality of Cleebronn and is one of the best preserved Hohenstaufen castles in Germany.
The town of Magenheim was first mentioned in 793, and its last mention dates back to the 9th century. The town was probably absorbed into the town of Rauhenklingen south of Michaelsberg, which was abandoned around 1500. The Lords of Magenheim were first mentioned in the 12th century and had two castles located close to each other: Obermagenheim Castle on Michaelsberg, which has now disappeared, and Niedermagenheim Castle, from which the current castle dates back. The exact date of the two castles' foundation is not known, so it is also disputed which of the castles was the older. According to architectural findings, Niedermagenheim Castle was probably built between 1220 and 1250 and later changed several times. The early owners, the Lords of Magenheim, renounced their ownership of Niedermagenheim Castle with half of Brackenheim and half of Cleebronn in favor of Count Eberhard II of Württemberg in 1367 and died out in the early 15th century. Württemberg pledged Niedermagenheim with half of Cleebronn as well as Rodbach, Meimsheim and Botenheim to Weiprecht von Helmstatt in 1391. In 1408, Bernold von Talheim was named as the pledgee.