After the donation of the Collegiate Foundation St Peter and Alexander to the Archbishopric of Mainz (around 982), the history of Aschaffenburg became closely linked with that of the electorate and the archbishopric of Mainz. The town profited from the significance of the fact that Mainz had provided the imperial archchancellor, next to the emperor the most important person in the Holy Roman Empire of the German nation. With the building of the bridge over the River Main and a system of fortifications, as well as the incorporation of the suburbs, Aschaffenburg rapidly developed into an economic and political centre, and became the most important secondary residence of the Mainz electoral archbishops.
There was already a castle on the banks of the Main in the 13th century, however this building was largely destroyed in the Margravial War in 1552. Between 1605 and 1614, Electoral Archbishop Johann Schweikard von Kronberg (r. 1604–1626) had Johannisburg Palace built in the same location: it is one of the most outstanding masterpieces of Late Renaissance architecture in Germany.
When French troops started occupying Mainz in 1792, the Mainz electoral archbishop was forced to flee with his court and property. Johannisburg Palace thus became the main residence of the Mainz electoral bishops. This phase was however short-lived: in 1803 secularization put an end to the Mainz electoral state and Aschaffenburg was converted into a principality. From 1814 the town belonged to the kingdom of Bavaria and Crown Prince Ludwig, who later became King Ludwig I, lived in Johannisburg Palace regularly in the summer.
With the end of the monarchy Johannisburg Palace came into the possession of the Free State of Bavaria and is today the responsibility of the Bavarian Palace Administration. The interior was first opened as a museum in 1932. It was badly damaged in the Second World War, and the state rooms remained closed until 1964. Johannisburg Palace now houses museum sections run by the Bavarian Palace Administration and the Bavarian State Painting Collections, with the addition in 1972 of the Municipal Palace Museum.
Since the renovation of the wing facing the River Main from 2016–2023 the following sections of the palace can be visited: the State Gallery with works by Lucas Cranach the Elder, the Parament Chamber with vestments from the former Mainz cathedral treasury, the Palace Chapel with the high altar and pulpit by the sculptor Hans Juncker, the world’s largest collection of cork models of ancient Roman buildings, the Princely Apartments with their original Neoclassical furniture and the Municipal Palace Museum with exhibits documenting the history of Aschaffenburg. Johannisburg Palace also houses Aschaffenburg’s court library.