In 1806 he married Teresa Casati. During the Napoleonic period Confalonieri was among the opponents of the French régime, and was regarded as one of the leaders of the Italian national party (Italiani puri). At the time of the Milan riots of 1814, when the minister Giuseppe Prina was assassinated, Confalonieri was unjustly accused of complicity in the deed. After the fall of Napoleon he went to Paris with the other Lombard delegates to plead his country's cause, advocating the formation of a separate Lombard state under an independent prince. But he received no encouragement, for Lombardy was destined for Austria, and Lord Castlereagh consoled him by saying that "the Austrian government was the most beneficent in the world." Confalonieri went on to London, in the hope of winning the favour of the British government, but failed in his object. He then joined the freemasons and some of the various other secret societies with which all Europe was swarming, being initiated by Filippo Buonarroti (1761–1837), an old Tuscan Jacobin living in Paris. On returning to Milan, where he found the Austrians in possession, he at first devoted himself to promoting the material progress of his country, but he was ever watching for an opportunity to liberate it from the foreigner.
Early in 1821, when the atmosphere was thick with rumours of revolt, he visited various parts of Italy to sound the liberal leaders, and also corresponded with the Piedmontese officers who, believing that they had the approval of Prince Charles Albert of Carignano, the heir to the throne, were planning a military revolt. There was talk of a rising at Milan combined with a Piedmontese invasion to expel the Austrians, but the plans were very vague and unpractical, for the military conspirators could count only on a few hundred men, and Confalonieri warned them that Lombardy was not ready. On the outbreak of the Piedmontese revolt (March–April 1821) the Austrian authorities made some arrests, and, through the treachery of one conspirator and the foolishness of others, discovered the plot, if it could so be called, and arrested Silvio Pellico and Maroncelli and afterwards Confalonieri.
A long trial now began, conducted with all the rigour and secrecy of the Austrian procedure, and Confalonieri, outwitted by the astute examining magistrate, A Salvotti (d. 1866), contradicted himself, made fatal admissions, even compromised others, and together with several companions was condemned to death for high treason, but through the intercession of his wife and father, who went to Vienna to plead his cause in person, the emperor Francis commuted the penalty to perpetual imprisonment in the fortress of Spielberg (January 1824). Confalonieri was taken to Vienna and had a long interview with Prince Metternich, who tried to extract further confessions incriminating other persons, especially Charles Albert, but although Confalonieri seemed at one time inclined to prepare a report on the revolutionary movement for the emperor, he did not do so, and once he was in prison he refused to say or write another word, and was treated with exceptional severity in consequence.
His wife died in 1830, and in 1836, on the death of the emperor Francis, he was pardoned and exiled to America. He came back to Europe after a year's absence, and in 1840 obtained permission to return to Milan to see his dying father. He himself, broken in health and spirits, died on 10 December 1846, too soon to see the accomplishment of Italian freedom. He had undoubtedly played a considerable role in the conspiracy of 1821, being the most influential and richest of the Milanese Liberals; when first arrested his conduct may have been open to criticism, but he more than expiated any temporary weakness due to ill-health and to the barbarous methods of examination by his heroic attitude during his long imprisonment, and his persistent refusal to accept offers of pardon accompanied by dishonouring conditions.
His Memorie e Lettere have been edited by Gabrio Casati (2 vols., Milan, 1890). Alessandro D’Ancona’s Federico Confalonieri (Milan, 1898) is based on the memoirs and on a large number of secret documents from the archives of Vienna and Milan. Alessandro Luzio’s Antonio Salvotti e i processi del Ventuno (Rome, 1901) contains many fresh documents which to some extent exonerate Salvotti from the charge of cruelty; among other papers Metternich’s account of his interview with Confalonieri is given in full. See also Alessandro Luzio, Nuovi documenti sul processo Confalonieri (Rome, 1908).