He studied law at the University of Parma from 1782 to 1786. In 1791 he became the chief civil magistrate of Trento. In the late 18th and early 19th century Trento was successively under the rule of France, Italy and Austria. In 1799 Romagnosi was arrested in Innsbruck during fifteen months by the Austrians on account of his alleged sympathy with the French, but he was acquitted. In 1801 the French occupied Trento, and he was raised to the position of Secretary of the Higher Council. He was successively professor of law at Parma, Pavia, Pisa and Milan. After the fall of Napoleon he lost his position at the Milan university, but continued to lecture till 1817. In 1818 he was again tried for treason at Venice, and again acquitted. Carlo Cattaneo was his student and he was largely influenced by his thought.
He died in Milan in 1835.
His most celebrated work is Introduzione allo studio del diritto pubblico universale (2 vols., Parma, 1805).
Although Romagnosi was not a scientist, he made some experiments with a voltaic pile and its influence on a compass. He published two accounts of his findings in 1802, in Italian newspapers. It is sometimes assumed that he found a relationship between electricity and magnetism, about two decades before Hans Christian Ørsted's 1820 discovery of electromagnetism. However, his experiments did not deal with electric currents, and only showed that an electrostatic charge from a voltaic pile could deflect a magnetic needle. However, as Joseph Hamel has pointed out, Romagnosi's discovery was documented in the book by Joseph Izarn, Manuel du Galvanisme (1805), where a galvanic current (courant galvanique) is explicitly mentioned. It was also mentioned on page 340 of the book by Giovanni Aldini, Essai théorique et expérimental sur le Galvanisme (1804): "Cette nouvelle propriété du galvanisme a été constatée par d'autres observateurs, et dernièrement par M. Romanesi, physicien. de Trente, qui a reconnu que le galvanisme faisait décliner l'aiguille aimantée." Aldini was also communicating with Ørsted at the time, Hamel notes.