The original castle at Stolzenfels was built as a fortification by the Prince-Bishop of Trier, then Arnold II. von Isenburg (de). Finished in 1259, Stolzenfels was used to protect the toll station on the Rhine, where the ships, at the time the main means of transportation for goods, had to stop and pay toll.
Over the years it was extended several times (notably in the 14th century), occupied by French and Swedish troops in the Thirty Years' War and finally, in 1689, destroyed by the French during the Nine Years' War. In 1802, the castle became the property of the city of Koblenz.
In 1823, the ruined castle was given as a gift to Prussian Crownprince Frederick William IV of Prussia by the city of Koblenz. In 1822, the Rhineland had become a province of Prussia. Frederick William had travelled along the Rhine in 1815, the year when the Congress of Vienna awarded several Princedoms in the area to Prussia, and had been fascinated by the beauty, romance and history of the region. In the spirit of Romanticism, Frederick William now had the castle rebuilt as a Gothic Revival palace. By 1842, the main buildings and the gardens were finished. On 14 September of that year, Frederick Wiliam, since 1840 King of Prussia, inaugurated his new summer residence in a great celebration involving medieval costumes.