Born into a family of craftsmen, Longoni enrolled for evening classes in 1875 and then for normal courses the following year at the Brera Academy, Milan, where he formed friendships with Gaetano Previati and Giovanni Segantini. Having completed his studies there, he went to Naples in 1880 and attended the local academy for a few months. He returned to Milan in 1882 and was introduced by Segantini to the art dealer Vittore Grubicy, who supported both artists during a long stay in the area of Brianza and Lake Segrino, where Longoni painted portraits and still lifes. He produced his first socially committed works at the end of the decade and presented a Divisionist work at the 1st Brera Triennale in 1891. Isolated from academic circles as a result of opposition to their artistic views, he developed the Divisionist technique of separate colours still further over the following years and focused on landscapes painted from life during numerous stays in the mountains.