Just before the revolution of 1848, being warned that he would be arrested, he fled to Turin, but after the Five Days he returned to Milan and edited a paper called "La Guardia Nazionale". Between 1849 and 1850 he published his "Storia degli Italiani" (Turin, 1855) and many other works. In 1857 the archduke Maximilian tried to conciliate the Milanese by the promise of a constitution, and Cantù was one of the few Liberals who accepted the olive branch, and went about in company with the archduke. This act was regarded as treason and caused Cantù much annoyance in later years. He continued his literary activity after the formation of the Italian kingdom, producing volume after volume until his death. For a short time he was member of the Italian parliament; he founded the Lombard historical society, and was appointed superintendent of the Lombard archives.