The Rocca has a long history that began in 1261, when the Municipality decided to purchase land on which to build a fortress to defend the city.
The building of the Rocca was part of the historical context of the struggle for power over the city between the Guelph and pro-imperial Ghibelline forces, which affected the entire Romagna area from the 13th century onwards. In the course of time, the building went through structural changes, reconstructions and reconstructions, in relation to what was happening in the city: the passage from the seigniory of the Alidosi to that of the Visconti, then to that of the Manfredi, and finally to the Milanese family of the Sforza, the name by which the Imola fortress is still known: Rocca Sforzesca.
Built on a quadrangular plan, nine rectangular towers were inserted in the perimeter of the curtain walls while a tenth (the keep) was placed in the centre. It is precisely the keep with its dungeons, the portal with a pointed arch opening onto the main façade and one of the ancient rectangular towers, incorporated into the south-east corner tower, that are the elements from the oldest period that are still preserved. Updates to the mediaeval layout, carried out between 1472 and 1474, were necessary to adapt the defensive architecture to the power of the new firearms and were carried out at the behest of the Sforza family, at that time rulers of Imola. The curtain walls were thickened, a deeper moat was dug and two ravelins were built to protect the most exposed curtains. The architect of the works was the military architect from the Sforza court in Milan, Dainesio Maineri. The project he drew up, which also included the construction of a citadel for quartering hundreds of soldiers, was not completed due to changed political conditions. The
new lord of Imola, who from 1473 was Girolamo Riario, resumed work on modernising the fortress, which led to the construction of the four circular corner towers and the creation of a residential area in the Soccorso courtyard, the so-called palazzetto del Paradiso. In 1500, the fortress came under papal rule in a bloody manner, thanks to Cesare Borgia, the conqueror of Imola. The passage marked a change in the function of the Rocca, which went from being a defensive device to being used mainly as a prison, a role it fulfilled until the 20th century.
The personalities who have inhabited the Rocca and contributed to making its history are many, but one more than the others has etched itself strongly in the imagination not only of the city, that of Caterina Sforza. Wife of Girolamo Riario, upon the latter's death in 1488, she became mistress of Forlì and Imola until the year 1500.
Caterina was the illegitimate daughter of Galeazzo Maria Sforza and his mistress Lucrezia Landriani. The young girl was brought up within the Milanese court and trained in military
strategy; she could ride like a soldier, used weapons and had acquired the unscrupulousness of a consummate Renaissance warlord.
Alongside this strong and determined aspect, he was familiar with humanistic culture, knew Latin and Greek, and cultivated an uncommon competence in creating ointments, medicaments and lotions, so much so that he wrote a fundamental text for Renaissance pharmacopoeia and cosmetology, the Experimenta, which contains recipes ranging from curing the bite of a dog or curing scrofula to the more frivolous making hair as blond as gold or making beauty for women. She was
a rich, multifaceted, modern personality, and passionate in her sentimental life: she had three husbands and from the last Cosimo de' Medici, a beloved son destined to become a famous captain of fortune, Giovanni de' Medici, known as Giovanni dalle Bande Nere.