The history of the castle coincides with and reflects the history of Piombino. Its present form is in fact the result of several building phases carried out between the 13th and 19th centuries. During the 12th century Piombino was an important centre controlled by Pisa. At that period, just outside the original town wall where the castle would later be built, there was a cemetery, brought to light during the excavations, which was almost entirely destroyed in the first decades of the 13th century. In 1235, as confirmed by the epigraph found during excavations, the municipality decided to enlarge the town wall - part of this wall and a large gate-tower (now completely restored) was built on the cemetery ground.
When the state of Piombino was founded by Gherardo d’Appiano at the end of the 14th century, the town and the castle were further fortified. In the first half of the 15th century, the earlier Pisan fortress was doubled in size transforming it into a larger defensive structure capable of housing a larger number of soldiers. The last important transformation occurred in mid 16th century, when at the behest of Cosimo I dei Medici, a fortress designed by the architect Giovanni Camerini was constructed. The castle thus stood in an large area enclosed by a surrounding wall with four angular bastions. The realisation of the fortress involved the doubling up of the castle walls, the raising of the roof, the laying of new floors and the erection of internal walls.
Subsequently the complex remained an important defensive outpost used during the various military occupations of Piombino between the 17th and 19th centuries. It was in this period that the large cistern was built; discovered during excavations, it has now been restored. From the second half of the 19th century until 1960, the castle was converted for use as a prison. In 1888 and 1901, 28 cells were constructed for this new function. As an illustration of this period, a few cells have been conserved on the ground floor as has a wall with prisoners’ writings and drawings on the upper floor.