Cavalli was born at Crema, Lombardy. He became a singer (soprano) at St Mark's Basilica in Venice in 1616, where he had the opportunity to work under the tutorship of Claudio Monteverdi. He became second organist in 1639, first organist in 1665, and in 1668 maestro di cappella. He is chiefly remembered for his operas. He began to write for the stage in 1639 (Le nozze di Teti e di Peleo) soon after the first public opera house opened in Venice, the Teatro San Cassiano. He established so great a reputation that he was summoned to Paris from 1660 (he revived his opera Xerse) until 1662, producing his Ercole amante. He died in Venice at the age of 73.
In addition to operas, Cavalli wrote settings of the Magnificat in the grand Venetian polychoral style, settings of the Marian antiphons, other sacred music in a more conservative manner – notably a Requiem Mass in eight parts (SSAATTBB), probably intended for his own funeral – and some instrumental music.
Cavalli introduced melodious arias into his music and popular types into his libretti. His operas have a remarkably strong sense of dramatic effect as well as a great musical facility, and a grotesque humour which was characteristic of Italian grand opera down to the death of Alessandro Scarlatti. Cavalli's operas provide the only Example of a continuous musical development of a single Composer in a single genre from the early to the late 17th century in Venice — only a few operas by others (e.g., Monteverdi and Antonio Cesti) survive. The development is particularly interesting to scholars because opera was still quite a new medium when Cavalli began working, and had matured into a popular public spectacle by the end of his career.
Cavalli's music was revived in the twentieth century. The Glyndebourne production of La Calisto is an Example. More recently, Hipermestra was performed at Glyndebourne in 2017. The discography is extensive and Cavalli has featured in BBC Radio 3's Composer of the Week series.