He assisted Uguccione in many enterprises, including the capture of Lucca (1314) and the Battle of Montecatini (1315), in which he was the main protagonist of the victory over the Guelph League led by the Florentines. However, due to his growing popularity, Uguccione had him jailed and condemned to death. An insurrection of the Lucchesi having led to the expulsion of Uguccione and his party, Castruccio regained his freedom and his position, and the Ghibelline triumph was presently assured.
Elected lord (as lifelong consul) of Lucca on June 12, 1316, he warred incessantly against the Florentines, and was at first the faithful adviser and staunch supporter of Frederick of Austria, who made him imperial vicar of Lucca, Lunigiana and Val di Nievole in 1320. After the Battle of Mühldorf he went over to the emperor Louis the Bavarian, whom he served for many years. In 1325 he defeated the Florentines at Altopascio, and was appointed by the emperor duke of Lucca, Pistoia, Volterra and Luni; two years later he captured Pisa, of which he was made imperial vicar. But, subsequently, his relations with Louis seem to have grown less friendly and he was afterwards excommunicated by the papal legate in the interests of the Guelphs (1327).
At his death in 1328 the fortunes of his young children were wrecked in the Guelph triumph.
Niccolò Machiavelli's Life of Castruccio Castracani is his third important political book and significant for the understanding of Machiavelli's political philosophy. Mary Shelley's novel Valperga; or, The Life and Adventures of Castruccio, Prince of Lucca, published in 1823, is based on the life of Castruccio Castracani, though the dates are slightly changed.