He was the son of Giovanni Maria Dal Verme, count of Sanguinetto, and of Ottavia Meli-Lupi, marquise of Soragna.
After attending La Sapienza University of Rome, he obtained his doctorate in in utroque iure on 26 January 1688.
He went to Rome that same year and accompanied Mario Alberizzi, apostolic nuncio to Vienna, as secretary.
Despite having declined the episcopal promotion several times to the headquarters of the same city that had been repeatedly proposed by the Duke of Parma, he could not oppose the wishes of Pope Innocent XI who forced him to take possession of that episcopal see, electing him on 20 December 1688.
Transferred to the Imola site from that same date, he participated in the 1700 conclave that elected Pope Clement XI.