By the age of 20, he decided to become an artist, and trained with the engraver Vincenzio Vangelisti. He also trained with Aspari, Traballesi, and Franchi. He moved to Rome. He returned to Milan to teach engraving at the Brera Academy.
Longhi produced a notable engraving of Napoleon in 1797.
The following year he became a professor of engraving at the Brera Academy. In 1801 Longhi visited Paris, where he met many artists, including Jacques-Louis David and Nicolas-Henri Tardieu.
Among Longhi"s works are engravings of the Marriage of the Virgin (original by Raphael) and a Mary Magdalene by Correggio. He is said to have died from a stroke while engraving the Last Judgement by Michelangelo.
Among his pupils were Beretta, Cozzi, Paolo Caronni, Ghiberti, Samuel Jesi, Caporali, Giuseppe Bisi, Jakob Felsing, Garavaglia, and Pietro Anderloni.
He died in Milan in 1831.