[3] The origin of the town dates back to a Roman castra, called Castrum Leonis, ("Lion's Castle"), built to command the valley that leads to the San Pellegrino Pass, the easiest access for armies over the Apennines.
Castiglione surrendered, but the high taxes imposed led the city to form a league with other communes of Garfagnana against Lucca.
Political conflicts continued in the following years, until a peace was reached in 1371: Lucca gained definitive control of Castiglione, and established a permanent administrator.
The Congress of Vienna (1815) assigned Castiglione to Marie Louise of Bourbon, Grand Duchess of Lucca, who in 1819 gave it to Francis IV of Modena.
The church of San Pietro was erected in 723 by two Lombard brothers, Aurinand and Gudifrid, but was largely rebuilt in the 12th century by Bishop Guido III of Lucca.