It was established in 1748 as a hunting lodge by Duke Charles Christian Erdmann, a scion of the House of Württemberg, whose ancestors had been enfeoffed with the Silesian Duchy of Oels in 1649. The adjacent settlement erected from 1763 with its streets radiating out from the ducal palace was modeled on and named after the Baden residence of Karlsruhe. When the Oels fiefdom fell to the Dukes of Brunswick-Wolfenbüttel in 1792, Charles Christian Erdmann's cousin Duke Eugen of Württemberg retained the town and palace of Carlsruhe as a fee tail. In the winter of 1806-07 he hosted the young composer Carl Maria von Weber, who wrote his two symphonies (Jähns 50/51) here. In 1847 Carlsruhe received the status of a spa town (Bad).
At the end of World War II the palace was destroyed in the course of the Vistula–Oder Offensive of the Red Army. The Baroque Sophia's Church finished in 1775 is preserved, as is the extended English garden laid out by the Württemberg dukes. An annual Carl Maria von Weber festival is held to commemorate the composer's stay.