The territory of Castel Guelfo lies between the municipalities of Dozza, Imola, Castel San Pietro and Medicina. The disputes between Bologna (Guelph) and Imola (Ghibelline) over possession of this border territory saw, in the early 13th century, the supremacy of the Bolognese government. The gradual grounding of crops by the city’s middle class during the 12th and XiV centuries culminated in the city of Bologna building a castle “Castrum Guelfum” in the early 14th century and sending a garrison to defend the settlers.
The settlement of the Malvezzi family, appointed counts in 1458, and the feudal form of government, ended the interference of Imola conferring a certain stability that lasted until the arrival of Napoleon in 1796. From the 1400s to the 1700s, the development and layout of the urban form was defined, characterized by the fortified structure and triangular architectural setting of the Borgo.
During the 1800s Castel Guelfo faced problems from the period between the French occupation and the unified state. Upon the death of Piriteo IV Malvezzi (1806), the properties passed to his daughter Maria Laura, who was married to Principen Astorre Hercolani. The different political-administrative arrangements caused by the unification of the country and the Fascist twenty-year period did not change the urban identity of Castel Guelfo.