About twenty kilometres from Bologna, in the heart of the Samoggia Valley, among the splendid hills bordering on the territory of Modena, is the regional park of the Abbey of Monteveglio. A fascinating protected area of about 1100 hectares characterised by hills, valleys, woods and gullies, capable of recounting a millenary history of which there is still evidence of great interest, such as the religious complex of the Abbey of Santa Maria, which occupies the highest part of the village, and the remains of the medieval castle of Matildic memory. One hypothesis on the name of the town would like Monteveglio to derive from the Latin Mons belli, that is, "Mountain of war". This hypothesis, although plausible from a phonetic point of view, is not supported by any evidence, since there is no evidence of any kind of fortification or Roman military presence in the area. More likely is the hypothesis that Monteveglio is a phonetic corruption of "Montebello".
During the Middle Ages, Monteveglio, together with other centres, was part of a system of fortifications which, built between the Samoggia and Panaro rivers, contributed to keeping the Longobards beyond the borders of the Exarchate of Ravenna until the final conquest by Liutprand in 727.
A feud of the Canossa family, Monteveglio was fundamental for the desperate resistance that the Countess Matilde put up against the Emperor Henry IV who had descended into Italy to take revenge for the famous humiliation inflicted on him under the walls of the castle of Canossa by Pope Gregory VII. It was precisely at the gates of Monteveglio that in a clash at La Cuccherla, the emperor saw a son die in battle and probably for the first time his hope of submitting the papacy to his policies was dashed. Shortly afterwards, in fact, Henry IV, whose army had been made difficult by the sorties of the Monteveglio people barricaded in the castle, lifted the siege with winter approaching.
For a few centuries Monteveglio followed the ups and downs of the struggles between Bologna, to which it had surrendered for the first time in 1157 (Countess Matilde had died without an heir almost half a century before) and Modena and between Guelphs and Ghibellines. Its castle was periodically conquered, reconquered, destroyed and rebuilt by Bolognese, Modenese, local lords, and mercenary companies, and suffered its last terrible siege in the spring of 1527. The Lansquenets of Charles V, who shortly afterwards took part in the "sack of Rome", were not able to conquer Monteveglio because of a sudden worsening of the weather conditions. The snow that fell in abundance the night before the assault, together with the poor condition of the surrounding territory and perhaps the prayers and vows of the inhabitants barricaded almost hopelessly in the fortress, obtained the miracle of seeing the invaders leave. Still today, every year, in memory of that terrible moment, Monteveglio in celebration offers the Madonna a candle carried in procession to the ancient parish church of Santa Maria.