First reports about the Castel Sant’Elmo come from 1275. In 1329 Robert of Anjou entrusted Tino di Camaino (Sienese sculptor and Architect) with the expansion of the building into a huge quadrilateral palatium composed of two towers expressly requested for the King and his entourage; in 1348 it is described as “castrum Sancti Erasmi” because of a chapel consacrated to St. Erasmus.
During the Spanish Kingdom (1504-1707) the castle, called Sant’Ermo and then Sant’Elmo, was transformed into a defensive fortification. Its star-shaped construction started in 1537; a year later, an epigraph was placed on the main gate with King Carlo V’s eagle of Hapsburg emblem standing on top of it.
In 1547 Pietro Prato built the church, which was destroyed by a thunder in 1587, the military lodgings and the castellan’s apartment block.
Between 1599 and 1610 the castle was restored by Domenico Fontana. From 1860 t o 1952 it was designated as a military prison. At a later stage, the fortress belonged to the military property. In 1982 the management of the entire building was entrusted to the Superintendence of Cultural Heritage of Naples which started up a restoration work useful to gain new modern exbition spaces.