Born in Viggiù, Lombardy, Longhi began as assistant for his father, and inherited the latter's commission at his death in 1591. He is described by contemporary sources as a ruthless figure, a companion of Caravaggio, together with whom he was tried for homicide in Rome in 1606, and subsequently exiled.
Returning to Lombardy he executed several unfinished plans for the Duomo of Milan and other churches, until a Papal amnesty allowed him to come back to Rome in 1611. Here he designed the first plan for the church of the Milanese nation, San Carlo al Corso, which was completed by his son and by Pietro da Cortona. Other Longhi's works include the church of Santa Maria Liberatrice in the Roman Forum (later destroyed by the excavations which brought to light Santa Maria Antiqua) and the Santoro Chapel in St. John Lateran.
He died in Rome in 1619.