Rastatt Castle and the garden were built in 1700 - 1707 by the Italian court architect Domenico Egidio Rossi on behalf of Margrave Ludwig Wilhelm von Baden.
After the residence of Margrave Ludwig Wilhelm in Baden-Baden was burned down by French troops in the Palatinate War of Succession, the construction of the destroyed castle no longer met the representative requirements of the ruler of Baden and he became a home for the Princess Franziska Sibylla Augusta of Saxony, who wed him in 1690. Lauenburg needed, a new residence was built in place of his hunting lodge in the market town of Rastatt.
The Corps de Logis hunting lodge, built in 1697, was demolished to make way for the new palace. The village of Rastatt, located in the middle of the Rhine valley, was then elevated to a town in 1700 and the margrave moved his court to Rastatt. The residence in Rastatt is considered to be the oldest baroque residence on the Upper Rhine and was built on the French model of Versailles, in which the godfather Ludwig Wilhelm, the sun king Louis XIV, ruled absolutistically.
All of Europe looked at the power of the French monarch and tried to emulate him. So it is also to be understood why Ludwig Wilhelm spent the sum of approx. 12 million guilders for the Rastatt Castle in order to impress the regents in the German lands. Ludwig Wilhelm always tried to gain the electoral dignity, and when he had not been given the desired honors after his military successes in the Turkish wars and on the Rhine and the Polish royal dignity was no longer to be hoped for, he tried his claims to power by building the magnificent Rastatt Palace to underpin. In 1705, the margravial family moved into the not yet finished castle, Ludwig Wilhelm didn't have much of his castle himself, as he was always in the field most of the time and died as early as 1707 of a war wound. Margravine Franziska Sibylla Augusta commissioned the Bohemian master builder Johann Michael Ludwig Rohrer with the further expansion of the Rastatt palace.
The Rastatt Castle later served as a fortress command post in the 19th century.