She married on 5 May 1650 in Homburg to Duke Philip Louis of Holstein-Wiesenburg (1620–1689), who purchased Wiesenburg Castle and the associated Lordship in 1663.
From 1659, she employed her goddaughter Johanna Eleonora von Merlau.
Johanna Eleonora would later marry Johann Wilhelm Petersen and formulate a radical form of pietism.
At court, Johanna Eleonora met Philipp Jacob Spener and Johann Jakob Schütz and developed a deep friendship with Anna Margaret's daughter Sophie Elisabeth.
From her marriage Anna Margaret had the following children: This article about a German duchess is a stub.