Schönbrunn Palace was built after designs by Bernhard Fischer von Erlach from 1696 to 1712. Emperor Leopold I wanted to provide a stately chateau de plaisance for his first-born son and future emperor, Joseph, after the building that had previously stood on this site had been destroyed during the second Turkish siege of Vienna in 1683. However, Joseph died a year before the building was completed and it was subsequently used by his widow during the summer months. 
It was not until Maria Theresa succeeded to the throne in 1740 that Schönbrunn was elevated to the status of imperial residence. Alterations were carried out by Nikolaus Pacassi in order to accommodate the imperial family and the court household in appropriate style. At the same time the gardens were redesigned and extended under the supervision of Franz Stephan with the aid of horticultural designers from his native Lorraine.
The palace was occupied by the imperial family in the warmer months, from May to October. Each member of the imperial family had his or her own apartments which consisted of five rooms. The members of the court household had to make to with fewer rooms, depending on their rank. This led to problems of space, a situation that was remedied by allowing only select members of the household to move to the summer residence with the imperial family.
Under Maria Theresa’s successors the palace remained an imperial residence, but it was not until after the Congress of Vienna in 1815 that the imperial family regularly spent their summers at Schönbrunn. Emperor Franz Joseph was especially fond of Schönbrunn. During the last years of his life he lived here the whole year round and only had himself driven to the main residence, the Vienna Hofburg, for important affairs of state.
Parts of the palace could be viewed by appointment even during the lifetime of Franz Joseph. After the end of the monarchy in 1918 the entire first floor was opened to the public.